• Advertisement
Sign in to follow this  

Multiple TcpClienton one client?

This topic is 2090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does putting 2 different TcpClienton one client make sense if you are using different ports? Can the both receive data simultaneously?

I've been working on a game called Endeavor - http://endeavorgame.com/, There are some messages that are very large and would take some time to complete the data transfer. Probably only a matter of a couple hundred milliseconds but I don't want those messages to interrupt the flow of the game. I was thinking about sending constant data which is usually represented by large chunks of data through one TcpClient and the data that changes often which isn't a lot of data at all through another.

Thinking about it, if I just implement a simple prediction algorithm, I should be fine with one TcpClient and no real noticeable problems.

Still, if you know the answer to my original question, I would still really like to know.

-Thanks

Share this post


Link to post
Share on other sites
Advertisement
Yes, you can have multiple connections as long as the port touple

Yes, they can both transfer data at the same time. As an example, VoIP is often transmitted on a different channel than game data.

Both sets of data will be competing for bandwidth and other resources.

Share this post


Link to post
Share on other sites
TcpClient is generally not bound to a port explicitly on the client side, but instead an available port is assigned when you connect it.
Both clients can connect to the same remote port if you want.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement