BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: How to send files and text from client to server...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Nov 19, 2003 11:09 pm    Post subject: Re: How to send files and text from client to server... Reply with quote




"Santy Concepción" <NO*SPAM*SANTYCG (AT) terra (DOT) es> wrote


Quote:
Have I to use two separate TCPServer components in the
server (one for messages and one for file receiving)???

Typically, it is best to do file transfers on a separate connection, yes.

Quote:
I have tried this (two tcpserver in server app and two tcpclient in
client-side app, but when I try to make the second connection, it fails:
"connection refused".

Did you activate the second server? Did it activate correctly? Are you
sure that you are using a separate port number for it?

Quote:
The problem is that while the file is being sent, client and server
have to stay connected, so the can send messages eachother.

They should not have anything to do with each other. Separate connections
are completely separate from each other. However, if you want to drop the
file transfer connection if the communications connection goes down, that is
your choice. Sockets themselves do not enforce that. That is an
application design issue.

Quote:
How can I know if the incoming data is a message or a file?

Best to just use a separate connection that is dedicated to the file
transfer. But if you must share a single connection for both messages and
files, then you'll have to put a header block on every data packet that you
send (if you are not already), so that the receiver can look at the header
block and decide whether the packet describes message data or file data.
Also, when sending the file, send it in smaller pieces so that message
packets can still be transmitted in between them in a timely fashion.


Gambit



Back to top
Eugene Mayevski [SecureBl
Guest





PostPosted: Thu Nov 20, 2003 2:02 am    Post subject: Re: How to send files and text from client to server... Reply with quote



Santy Concepción wrote:

Quote:
The problem is that while the file is being sent, client and server have to
stay connected, so the can send messages eachother.
How can I know if the incoming data is a message or a file? Is it possible?
Is there any example of this?

If you are dealing with messages, take a look at MsgConnect
([url]http://www.msgconnect.com)[/url]. It will definitely make your life easier.

--
Eugene Mayevski
EldoS Corp., CTO
Security and networking solutions
http://www.eldos.com


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.