How to implement file transfer with Java sockets?

Posted by ZeKoU on Stack Overflow See other posts from Stack Overflow or by ZeKoU
Published on 2010-04-21T07:22:24Z Indexed on 2010/04/21 7:23 UTC
Read the original article Hit count: 251

Filed under:
|
|
|
|

Hello,

I am working on a chat implementation with Java sockets. I have focused on few functionalities, like authentication, one person chat and a group chat. I was thinking about adding file transfer functionality, and I wonder what's the good practice about this. Should I have separate socket on the server with different port listening just for file transfers? Right now input and output streams that I get from server socket are binded to Scanner and PrintWriter objects respectively, so I find it hard to use that for file transfer.

Any patterns you guys could recommend or give me good recommendations are very appreciated.

Thanks,

ZeKoU

© Stack Overflow or respective owner

Related posts about java

Related posts about socket