aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Transfer files and message over a single socket at the same time? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Transfer files and message over a single socket at the same time?" Watch "Transfer files and message over a single socket at the same time?" New topic
Author

Transfer files and message over a single socket at the same time?

Mikael Fox
Greenhorn

Joined: Mar 22, 2009
Posts: 23
Hello guys,
I want to know if its possible to use the same socket to transfer two things at the same time.


I was developing a chat, now I want to implement the FTP function in it, that is, unable a user to both chat and send a file. What must I do, i have already implemented the chat part, but I am not sure , whether to create a new socket, or new streams or just use the same streams as above.

Thanks for your help.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Think of a socket as a pipe through which you push one byte at a time.
Mikael Fox
Greenhorn

Joined: Mar 22, 2009
Posts: 23
Thanks for the reply .. but that means that I will have to create a new socket then? Don't you think adding another socket will reduce the performance of my program?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transfer files and message over a single socket at the same time?
 
Similar Threads
Help me out !
A general question
Need Server to know name of Transfering File
chat
URLConnection problem