3.6 The Fragment streamsocket

The following describes the operations of StreamSocket in order of appearance. StreamSocket inherits from Stream. theSocket is the BasicSocket used to transfer the data.

timeoutValue is the timeout used on all operation that do not enter a timeout. This includes all the patterns inherited from stream.

sameConnection checks if the OS level connection wrapped in this StreamSocket is the same as the one wrapped in other. A StreamSocket connection may be closed by close. After this point, the StreamSocket cannot be used for communication, so you can discard (i.e. forget) it. StreamSockets should be closed after use to free up system resources. Flush ensures that all data in internal buffers of the StreamSocket actually gets sent. close does an automatic flush. Put, get and peek work as with other streams.

PutText, getLine and getAtom work like in other streams. Eos returns true if no data can possibly be read from this connection now or ever. On the other hand, it may still happen that the communication partner holds the connection alive but will not write any more data to it. In this case, this process has no chance of guessing that no more data will actually arrive, so eos will spontaneously change from false to true when the other process actually closes the connection.

Init, forceTimeout, usageTimestamp, NonBlockingScope, leaveNBScope, connect, error, host, port, inetAddr, idle uses the implementation in BasicSocket directly.

Process Libraries - Reference Manual
© 1994-2002 Mjølner Informatics
[Modified: Friday October 20th 2000 at 14:22]