Inheritance diagram for InterprocessConnectionServer:

To use this, create a class derived from it which implements the createConnectionObject() method, so that it creates suitable connection objects for each client that tries to connect.
Public Member Functions | |
| InterprocessConnectionServer () | |
| Creates an uninitialised server object. | |
| ~InterprocessConnectionServer () | |
| Destructor. | |
| bool | beginWaitingForSocket (const int portNumber) |
| Starts an internal thread which listens on the given port number. | |
| void | stop () |
| Terminates the listener thread, if it's active. | |
Protected Member Functions | |
| virtual InterprocessConnection * | createConnectionObject ()=0 |
| Creates a suitable connection object for a client process that wants to connect to this one. | |
|
|
Creates an uninitialised server object.
|
|
|
Destructor.
|
|
|
Starts an internal thread which listens on the given port number. While this is running, in another process tries to connect with the InterprocessConnection::connectToSocket() method, this object will call createConnectionObject() to create a connection to that client. Use stop() to stop the thread running.
|
|
|
Terminates the listener thread, if it's active.
|
|
|
Creates a suitable connection object for a client process that wants to connect to this one. This will be called by the listener thread when a client process tries to connect, and must return a new InterprocessConnection object that will then run as this end of the connection.
|