[gnet] G_IO_Condition on a iochannel for a socket
- From: Aschwin van der Woude <aschwin van der woude netmill fi>
- To: gnet gnetlibrary org
- Cc: "nathan.letwory" <nathan letwory netmill fi>
- Subject: [gnet] G_IO_Condition on a iochannel for a socket
- Date: Wed, 27 Jun 2001 13:17:04 +0300
Hi,
It is not clear to me if this question belongs on this list or on the
glib-list, so please forgive and correct me if this questions belongs to
the glib-list.
We are not members of this mailinglist, so please cc: the reply to us.
I am participating in a small game-project. For this project we build a
client/server, decided to use gnet and glib, and use TCP/IP as a network
protocol.
Everything works fine, accepting connections, receiving data and so forth.
We use g_io_add_watch() to received socket/iochannel conditions.
But we noticed when the client-side hangs up the connection (tested with
telnet), a condition G_IO_IN is issued on the server.
There is no data to be received from the stream, so currently we used
this condition and this last fact to assume the otherside of the
connection has hung up. This solution seems to work fine for our
test-cases, but I doubt it is the correct solution.
We initially expected a G_IO_HUP condition to be received when the
otherside of the connection is closed.
We currently use the following versions :
glib version: 1.2.10-ximian.2
gnet version: 1.0.4-ximian.2
Could you shed some light on this curiosity?
Thanks,
Aschwin
--
If I have been able to see further,
it was only because I stood on the shoulders of giants.
Sir Isaac Newton
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]