Open simonqhughes opened 8 years ago
ARM Internal Ref: IOTSFW-1825
SOCKET_ERROR_WOULD_BLOCK
occurs when a read is greater than the queued data. Since TCP stream data is not a guaranteed to arrive all at once, it is legitimate for the TCP socket to generate multiple callbacks for a single logical "block".
Would it be reasonable to modify the behaviour of this test so that SOCKET_ERROR_WOULD_BLOCK
is not an error, but is actually a continuation flag?
If it's a stream then isn't the read size irrelevant? It's just the maximum size that you're able to accept at that time? Therefore less than that shouldn't be an error? Maybe a return code something like 'SOCKET_STREAM_MORE_DATA_AVAILABLE' ?
Hi
The tcp_echo_server test is currently coded to send/receive a max data buffer size of 1024 bytes, and so the test succeeds. However, if the data buffer size is increased to 2048 then the receive on the target server socket fails. This change can be done by modifying the following line in sal_tcpclient.py (currently at line 50):
for i in xrange(7):
to becomefor i in xrange(8):
The failure is here in:
Sockets should normally be blocking by default so my expectation is that that the target socket is blocking. This report doesn't occur for sends <= 1024 bytes