A socket client program establishes a connection with the server,
writes some bytes and waits for response using the (blocking) read()
.
But this fails with the error EINVAL
("Invalid argument").
Previous calls to create()
, bind()
and connect()
the socket have been made successfully.
My Question
Platform is Linux x64.
The problem was that I passed a size of 1 byte to the read()
function.
It seems that this is not supported
(why? what is the minimum size? must it be a multiple of 2/the bitness of the platform?).
Now I am passing 8 and it works. Thank you all for your comments.