how to send file throught socket, plz help me!

  • Thread starter Thread starter Nguyen Thanh Danh
  • Start date Start date
N

Nguyen Thanh Danh

I'm a student, i try search on Internet but i can't find any sample how to
send file throught socket, between 2 computer! Please help me! Thanks!
 
Hi Nguyen,

That's a fairly open question.

If it absolutely has to be through a socket that you have opened then you
need to create your own protocol that the server (source machine) and client
(target machine) use to tell each other what's going on.

The client will connect to the server's listening socket and they will have
a conversation over the TCP connection, and agree to transfer the file. At
which point you use the send command on the server side socket to transfer
the file to the client.

That's a very general overview. I strongly recommend that you get yourself
an FTP component instead. This will greatly simplify your task.

Try http://www.xceedsoft.com/products/FtpLib/index.aspx. The price may be
too much for you, so it might be worth searching the web for other suppliers
of FTP components.

Sorry if all this is very general, but it's such a wide question that all I
could do was supply a few pointers.

Regards

Adam.

--
===========================
Adam Benson
Omnibus Systems,
Leics. UK
Email : (e-mail address removed)
 
Back
Top