Skip to main content
GameDev.net gamedev.net
šŸ”’ Locked

Sdlnet_tcp_send blocking reason

Started by Mr.L May 6, 2012 at 2:12 PM 1 replies 1.9k views
Original Post
Mr.L
Mr.L
i'm working on simple programm that is just repeatedly sending an reseving messages von the other endpoint.
Then i noticed that when block both a little with sdl_delay(40)(Client) and sdl_delay(30)(server)
then sdlnet_tcp_send isn't blocking if there's no time between the sendings, it sends a few times, then it blocks for about 30 seconds, sends a few time, blocks, and so on.

why does tcp_send block , when i don't use delay?
hplus0603
hplus0603
You're probably trying to send too much data, so it has to block, waiting for the buffer to drain to the other end.
enum Bool { True, False, FileNotFound };
Mr.L
Mr.L
i think not, im just sending 128 bytes, and it blocks after about 50 sends.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.