Attention is currently required from: pespin, keith, dexter.
2 comments:
File src/input/e1d.c:
Patch Set #11, Line 340: osmo_fsm
I think this makes sense (but I wonder what happens if we do not get a complete D_TSX_ALLOC_SIZE chu […]
you would normally need to buffer any partial-read and wait until the remainder of the data is received. Alternatively, we can think about switching from SOCK_STREAM to SOCK_SEQPACKET to avoid that situation in general.
However, this then means breaking the client/server interface, which in turn means that we have to keep the old one for backwards compatibility.
at the very least we should add a FIXME here stating that buffering of a partial/short read (0 < ret < D_TSX_ALLOC_SIZE) should be done, and that dropping the connection is an ugly hack until we do that.
Patch Set #11, Line 391: osmo_fsm
Done
well, now you are dropping the data. So let's say you want to write 256 bytes, but you can only write 100 of those. Then you're dropping 156 bytes here, causing dis-continuity of the stream, creating buffer under or overruns in a synchronous network where transmitter and receiver expect a certain number of bytes per time frame.
So one would either
a) have to buffer the not-yet-written data and write it once the sokcet can be written-to again
b) switch to a SOCK_SEQPACKET which doesn't have the stream semantics
c) add a FIXME/comment like in the read case and drop the connection to avoid the situations described above.
To view, visit change 32374. To unsubscribe, or for help writing mail filters, visit settings.