3.8 SocketGenerators

A socketGenerator is a factory from which instances of streamSocket and of binarySocket can be obtained, in response to active sockets connecting to the socketGenerators port.

3.8.1 The patterns of socketgenerator

Bind must be executed to establish the given port number as an address, to which active sockets may connect. Executing bind with port=0 establishes a randomly chosen port number as an address. The actual port number used may be read from port. None of the other operations make sense on an unbound generator.

As usual, when you are done, execute close on the socketGenerator.

getPortableAddress exits a portableCommunicationAddress which describes the network identity of this socketGenerator. ForceTimeout and usageTimeStamp work as with the other socket variants, and the considerations concerning nonBlockingScope and leaveNBScope are as usual.

3.8.2 The patterns of streamgenerator and binarygenerator

To obtain a streamSocket on the next connection requested, execute getStreamConnection, and to obtain a binarySocket, execute getBinaryConnection. Remember to enter a timeout value. When you are done with the created socket, execute close on it.

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