• Advertisement
Sign in to follow this  

Question On Sockets and VC++

This topic is 4434 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'm using socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) to create a listen socket for a Ethernet connection. I get thrown lots of data which I place in a queue. I use this data to render an image. Obviously, I render and collect drawing data in separate threads. I've noticed sometime I have missing plot data. I think the render thread sometimes has a lock on the CPU for a short amount of time and as a result the socket reader thread misses out on some data. I may be completely wrong because my knowledge of sockets is not at a high level. Does Windows internally queue up socket data? Any help would be great. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Fixed the problem. I used the setsockopt with the SO_RCVBUF flag to increase my buffer. I verified the fix by setting a small number for the buffer. As expected, more of the image was missing. Thanks.

Share this post


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

  • Advertisement