List Info

Thread: Problems with Socket>>isPeerAlive




Problems with Socket>>isPeerAlive
user name
2006-10-31 11:43:47
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?


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )