Jump to content
  • Advertisement
Sign in to follow this  
RockySabre

TCP data not sent or received !

This topic is 4232 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

I am developing a c# network application using TCP sockets. I am using different threads (each thread with its own socket). I notice that when the number of threads increase, some sent data using Socket.Send(...) function is not received on the other side. I use socket.avaialable property to check if there is data to receive. should i use socket.poll(...). Any help will be appreciated, thnx. while(true) { if(socket.Avaialable > 0) { socket.Receive(bytes); break; } else { Thread.Sleep(n); } }

Share this post


Link to post
Share on other sites
Advertisement
It's likely it is received, however, it is probably being merged into another send call, so that once receive call receives data from more than one send call. The Forum FAQ talks more about this. TCP is a stream protocol, not a packet protocol.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!