Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi, I am planning to create an asynchronous sockets client-server architecture, however I have some questions to ask so it can clarify some things for me. I have build multiples REST architecture in the past but its my first time with sockets.

So lets say for example that I would like to create a simple chat, I understand that the server keep a sockets collections of all the connected clients and upon the reception of a message I'll just loop throught that collections to broadcast send the messages to all client.

Now, lets say that I also have support for file transfer and that the server is transfering a very big file to a client, what will happen if a chat message is broadcasted during this time and the file transfer is not completed? Will the client receive the message even if he is already communicating with the server to transfer a file? How should I deal with this if its not the case?

Thanks in advance!
Posted

1 solution

No, how? You can have separate IO ports for different purposes. You may use one port for "quick" message exchange, one for for "slow" file transfers. Or wait :-).

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900