[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Sockets.Socket and remote closing the connection
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Sockets.Socket and remote closing the connection |
Date: |
Mon, 27 Sep 2010 08:38:07 +0200 |
On Sun, Sep 26, 2010 at 23:44, Holger Hans Peter Freyther
<address@hidden> wrote:
> Hi all,
>
> I have a server that accept(2)'s a TCP connection and then immediately closes
> it again. On the Smalltalk side I want to figure out if the connection is
> still alive.
>
> Eval [
> s := Sockets.Socket remote: '127.0.0.1' port: aPort.
> s isOpen -> true
> s isPeerAlive -> true (according to netstat it is already in
> CLOSE_WAIT)
> s canRead -> true
> ]
>
> is there anything I can do to find out that the remote has closed the
> connection? On POSIX I would sooner or later get a -1 on read.
"Later", after the first read has returned a zero, I think. :) GST
should behave the same way.
Paolo
- [Help-smalltalk] Sockets.Socket and remote closing the connection, Holger Hans Peter Freyther, 2010/09/26
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection,
Paolo Bonzini <=
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection, Holger Hans Peter Freyther, 2010/09/27
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection, Paolo Bonzini, 2010/09/27
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection, Paolo Bonzini, 2010/09/27
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection, Holger Hans Peter Freyther, 2010/09/27
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection, Holger Hans Peter Freyther, 2010/09/27
- Re: [Help-smalltalk] Sockets.Socket and remote closing the connection, Paolo Bonzini, 2010/09/27