Clients connecting to libev server socket not getting all data sometimes

Jonathan Neuschäfer j.neuschaefer at
Sat Apr 6 07:33:10 CEST 2013

On Fri, Apr 05, 2013 at 10:20:59AM +0530, Ram wrote:
> Code seems to run fine most times , but sporadically  the clients
> connecting to the server are not able to recv() from the server.
> The servers sends using send() which returns fine , but the client
> gets nothing.

Are you using a custom client or something like netcat?
How is recv failing?

> The stripped down version of the server code is here
> Can someone help  point out if there are some obvious things I
> missed. I am beginner at socket programming in C

Your (stripped down) program is unsafe: Try sending a string of 1024
non-null characters to it. :-)

JOnathan Neuschäfer

More information about the libev mailing list