[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: network question
- From: Gert Scholten <gs2 dds nl>
- To: gtk-app-devel-list redhat com
- Subject: Re: network question
- Date: Mon, 23 Nov 1998 21:46:43 +0100 (CET)
On Mon, 23 Nov 1998 Fabien.Letouzey@lifl.fr wrote:
:> Hello, I had a question.
:>
:> I'm programming a network application, which uses gtk_input_add to assing
:> a function to the `read'ability of a INET stream.
:> The problem comes here: How do I detect if the other side has closed the
:> connection? I can't just read(),and check for it to return 0, because
:> read() will wait for data. And my function isn't called if there isn't any
:> data to read (which is logical, the connection was closed)
:>
:> How do I solve this problem ???
:>
:> Gert
:>
:
:I think you're wrong, read() won't wait for any data since
:EOF was reached. Actually I'm already using that in a GTK
:telnet client :) At least try it, even if I'm mistaken.
Well you see, I would like a functions ala `gtk_input_is_still_open'...
I can't do that with read(), because is may wait _really_ long if the socket
isn't open :(
Gert
:Xann.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]