The TCP session is used to primarily to represent a client connection that can be managed on a seperate thread. Threaded streamable socket with non-blocking constructor.
More...
Create a TCP socket from a bound TCP server by accepting a pending connection from that server and execute a thread for the accepted connection.More...
Normally called during the thread Initial() method by default, this will wait for the socket connection to complete when connecting to a remote socket.More...
TCPSession derived objects can be freely created with "new" and safely terminate their "Run" method on their own by self-deleting when the thread terminates.
Detailed Description
The TCP session is used to primarily to represent a client connection that can be managed on a seperate thread. Threaded streamable socket with non-blocking constructor.
The TCP session also supports a non-blocking connection scheme which prevents blocking during the constructor and moving the process of completing a connection into the thread that executes for the session.
TCPSession derived objects can be freely created with "new" and safely terminate their "Run" method on their own by self-deleting when the thread terminates.
Normally called during the thread Initial() method by default, this will wait for the socket connection to complete when connecting to a remote socket.
One might wish to use setCompletion() to change the socket back to blocking I/O calls after the connection completes. To implement the session one must create a derived class which implements Run().
Returns:
0 if successful, -1 if timed out.
Parameters:
timeout
to wait for completion in milliseconds.
The documentation for this class was generated from the following file: