Question On Sockets and VC++

Started by
0 comments, last by fathom88 18 years, 3 months ago
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.
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.

This topic is closed to new replies.

Advertisement