[gnet-dev] echoserver bug ?
- From: Eduardo Pérez Ureta <eperez dei inf uc3m es>
- To: gnet-dev gnetlibrary org
- Subject: [gnet-dev] echoserver bug ?
- Date: Thu, 7 Jun 2001 11:05:14 +0000
Is this a bug in echoserver ?
Shouldn't it use gnet_tcp_socket_server_accept_nonblock ?
--- - Thu Jun 7 10:49:43 2001
+++ echoserver.c Thu Jun 7 10:48:30 2001
@@ -194,9 +194,10 @@
GIOChannel* client_iochannel = NULL;
ClientState* client_state = NULL;
- client = gnet_tcp_socket_server_accept(server);
- g_assert (client != NULL);
-
+ client = gnet_tcp_socket_server_accept_nonblock(server);
+ if (client == NULL) return TRUE; /* connection closed before calling */
+ /* gnet_tcp_socket_server_accept_nonblock */
+
client_iochannel = gnet_tcp_socket_get_iochannel(client);
g_assert (client_iochannel != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]