clientsocket - instantiated by Clients to act as its socket
This subclass of SocketIO is instantiated by a Client
program. It is in many ways similar to a Simula file object,
with Open, Endfile and Close operations.
See the users manual in simioprocess.ps
Boris Magnusson, Lund Institute of Technology.
SocketIO class ClientSocket(Address);
ref(InterNetAddress) Address; ! Info on Server to talk
Class to use by a Client for communicating over a Socket.
ClientSocket objects has an object of class InternetAddress
as a parameter rather than a textual file-name. The `Open'
operation is implementing the elaborate sequence of
operations needed to establish a connection with a a Server.
Using the TCP/Stream protocol this involves exchange of
several messages and a time-out in case the external Server
does not respond. The time to perform an Open operation is
thus unpredictable. Operations for I/O are those described
Super: SocketBasics, SocketIO
Init: the parameter must denote a valid InternetAddress
Sequencing: (IsOpen / Open (GetChannelNo/ <IO-ops>)*
: <IO-ops>=(OutRecord / InRecord / EndFile)* /
: (Read / Write / EndFile)*
boolean procedure Open;
Open a Socket communication link to the Server. Wait until
the Server responds, then return true. If the Server does
not respond (or maybe does not exist) Open will return False
after some timeout period. The parameters to the object,
ServerInet, ServerPort are used to address the Server, and a
program executing on the Server to talk to.