Re: [gnet] New to gnet, simple program returns G_IO_STATUS_ERROR
- From: Hubert Sokołowski <h sokolowski wsisiz edu pl>
- To: gnet lists gnetlibrary org
- Subject: Re: [gnet] New to gnet, simple program returns G_IO_STATUS_ERROR
- Date: Mon, 10 May 2004 09:43:38 +0200
Hi!
You should change the code at line 24 to this
status = gnet_io_channel_readline_strdup (chan, &pszLine, &size);
fprintf (stderr, "status:%s\n%s",
G_IO_ERROR_NONE == status ? "G_IO_ERROR_NONE" : "some other
error");
gnet_tcp_socket_delete (sock_listen) ;
On Sat, 08 May 2004 11:46:57 -0600
"Nix N. Nix" <nix go-nix ca> wrote:
> Hi!
>
> I wrote a simple (48 line) program. Please find it attached.
>
> I don't understand why I get G_IO_STATUS_ERROR when I try to perform
> g_io_channel_read_line on the GIOChannel returned from
> gnet_tcp_socket_get_io_channel.
>
> From a previous email I seem to gather that gnet IO channels and glib
> IO
> channels are not entirely unified. Is this the case ?
>
> The story:
>
> I currently use Unix file descriptors wrapped up in FILE * structures
> (using fdopen), but I would like to migrate the whole shebang to
> GTcpSocket/GIOChannel, so I may use the same code on both Windoze and
> Linux. I want to continue to be able to treat both sockets and files
> using the same functions.
>
> TIA
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]