[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Read failures on Unix socket



On Tue, Nov 02, 2010 at 03:13:02PM -0400, Simon Perreault wrote:
> On 2010-11-02 14:56, Gilad Benjamini wrote:
> > - Open a Unix socket
> > - Bind to a socket in the file system
> > - Add an event with EV_READ and EV_PERSIST
> > - Wait for events
> > - When an event arrives, call recvfrom on the socket waiting for a fixed
> > size of ~1800 bytes
> 
> Aren't you supposed to listen() and accept() on Unix sockets, just like
> you would for TCP sockets?
> 

It's only necessary for SOCK_STREAM, not SOCK_DGRAM. Considering that the OP
claims everything worked with 1.4, and given the fixed sized reads, I
presumed he was using SOCK_DGRAM.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.