Re: [gnet-dev] gnet_io_channel_writen() clarification
- From: David Helder <dhelder gizmolabs org>
- To: Anastasios Bassoukos <abas aix meng auth gr>
- Cc: gnet-dev lists gnetlibrary org
- Subject: Re: [gnet-dev] gnet_io_channel_writen() clarification
- Date: 11 Dec 2003 11:31:21 -0500
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]