Re: [gnet-dev] gnet_io_channel_writen() clarification



On Wed, 2003-12-10 at 02:00, Anastasios Bassoukos wrote:
> On Wed, 2003-12-10 at 03:30, David A. Helder wrote:
> > I've finally investigated this.  This was delibrate.  If error is
> > G_IO_ERROR_NONE and bytes_read/written != n, then EOF was received.  The
> > programmer should check this.
> 
> Please note that this is true only for blocking sockets. For
> non-blocking sockets, reading an amount of bytes less than those
> specified means that the socket has only received so much data so far,
> it doesn't say anything about end-of-stream. 

Our sockets are blocking.  Using readn/writen on a non-blocking socket
is a bad idea.

David

-- 
David Helder - dhelder gizmolabs org - http://www.gizmolabs.org/~dhelder




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