[Freeciv-Dev] network send/growing buffers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
In a particularly large game (200x100 map, 10 AI) and fog of war
disabled, I kept getting my connection cut due to a large send buffer.
Digging through common/connection.c, I see some potential problems in the
connection flushing. Namely that the return value of write_socket_data is
never checked (lines 240 and 250). Shouldn't this value propagate back up
to send_connection_data, especially since the timeout value in the select
call is set to 0? What was happening was the large updates would bog down
the connection, causing the buffer to grow. If the server CPU is much
faster than the connection between it and a client, this could be
problematic for larger games. I'd much rather have my data take a while
to get there than to be completely disconnected.
Two potential work-arounds:
1. A small (non-zero) timeout value in select to let the buffer drain, OR
2. return error codes through the flush functions (-1 => try again, -2 =>
permanent error), or through an fc_errno-type variable
Comments?
-jdm
Department of Computer Science, Duke University, Durham, NC 27708-0129
Email: justin@xxxxxxxxxxx
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] network send/growing buffers,
Justin Moore <=
|
|