help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] Problems with Socket>>isPeerAlive


From: Robin Redeker
Subject: [Help-smalltalk] Problems with Socket>>isPeerAlive
Date: Tue, 31 Oct 2006 12:43:47 +0100
User-agent: Mutt/1.5.11+cvs20060403

Hi,

in the attachment there is a piece of code, which establishes a tcp
connection to a listening socket and reads all arriving data from there.

I thought i could use Socket>>isPeerAlive to test whether i can expect
further data from the prev. listening socket.

But then i shutdown the end point of the connection (the prev. listening
socket) isPeerAlive still signals true.

Is this wrong usage of isPeerAlive? Should i rather use Socket>>atEnd to
test whether the connection is still alive? Or something else?

Steps to reproduce:

  - open a listening socket on localhost port 1234
    (i use netcat: 'nc -l -p 1234')
  - start the Communicator.st like this:
    gst Communicator.st
  - ctrl-c/abort the netcat/listening process after Communicator
    connected
  - watch 'read hunk []' scrolling on the screen where you started gst.

Robin

-- 
and why is my signature missing?




reply via email to

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