• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Mikael Fox
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think of a socket as a pipe through which you push one byte at a time.
 
Mikael Fox
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!