help-smalltalk
[Top][All Lists]
Advanced

[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 11:31:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

On 09/27/2010 11:20 AM, Holger Hans Peter Freyther wrote:
On 09/27/2010 02:38 PM, Paolo Bonzini wrote:

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.

hmm. socket next is retuning nil but isOpen/isPeerAlive is still returning true.

in two different shells I do

1.) b := TCP.ServerSocket port: 6000 bindTo: TCP.IPAddress anyLocalAddress.
1.) b waitForConnection.
2.) s := TCP.Socket remote: TCP.IPAddress anyLocalAddress port: 6000.
1.) b accept.
1.) b close.
2.) s next. ->  nil
2.) s isOpen ->  true.

Good testcase, thanks.

Paolo



reply via email to

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