help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Sockets.Socket and remote closing the connection


From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] Sockets.Socket and remote closing the connection
Date: Mon, 27 Sep 2010 05:44:02 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc14 Lightning/1.0b2 Thunderbird/3.1.4

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]