VisualWorks 2.0 and Sockets 
Author Message
 VisualWorks 2.0 and Sockets

This is a repost of a question for which I've never seen a reply...

Can anybody tell me what a TCPclient in PPS must do to see whether a remote
connection has been closed by its corresponding TCPserver, please.
I've seen a similiar thread here with the same question, but no clear answer.
             I need  an advice how to accomplish that.

BTW: A small set of new classes and methods doing SMTP in VW 2.0, posted
THIS message here using the *Trumpet Winsock* 2.0B from Peter R. Tattam.
---
ANTICthanxIPATION,
 Klaus



Thu, 26 Jun 1997 17:18:19 GMT  
 VisualWorks 2.0 and Sockets

Quote:
>Can anybody tell me what a TCPclient in PPS must do to see whether a remote
>connection has been closed by its corresponding TCPserver, please.
>I've seen a similiar thread here with the same question, but no clear answer.
>             I need  an advice how to accomplish that.

The canonical way to do this using Posix, is to detect a zero-length read
on the socket.  In PPS, I always dedicate a thread to reading from the
socket.  When the socket is closed on the other side, the thread (blocked
on a read) reacts in a well-defined way (it's been a while since I've done
this, so I forget the detail; it's probably an exception raised because the
read can't be satisfied).

Note that using dedicated socket threads will affect the architecture
of your application.

Quote:
>BTW: A small set of new classes and methods doing SMTP in VW 2.0, posted
>THIS message here using the *Trumpet Winsock* 2.0B from Peter R. Tattam.

Great!  I'd love to see that code.

-dms



Fri, 27 Jun 1997 06:44:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Socket programming in VisualWorks 2.0

2. VisualWorks 2.0 for Windows and Socket

3. VisualWorks 2.0 for Windows and Socket

4. VisualWorks Widgets for VisualWorks 2.0 and 2.5

5. VisualKit 1.5 for VisualWorks 2.0 or VisualWorks 2.5

6. VisualWorks 2.0 vs VisualWorks 2.5

7. Free Multiple Inheritance for VisualWorks 2.0

8. Socket support for VisualWorks 2.5.1 VM on PowerMac

9. VisualWorks 2.0 -- Objects that refuse to die.

10. Help! VisualWorks 2.0 and C on Macintosh

11. VisualWorks 2.0 and URL's -- HELp please!

12. VisualWorks 2.0 Questions

 

 
Powered by phpBB® Forum Software