Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to send a file or photo to clients using sockets??  RSS feed

 
Yegappan Balasubramanian
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
I want to know how the clients can transfer a file or photo to one another when connected using sockets in java networking.Can any one help me how this should be done.It should work in a similar way as in msn messenger.Pls help me.
Thanks in Advance
---Yegappan---
 
Laudney Ren
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you have established a socket, the sender calls Socket 's getOutputStream and writes to the stream; the client calls Socket 's getInputStream and reads from the stream.
Either stream can be wrapped by higher-level stream such as FileOutputStream and OutputStreamWriter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!