#include <listeningconnection.h>
Inheritance diagram for Yagl::ListeningConnection:

Public Member Functions | |
| ListeningConnection () | |
| Constructor. | |
| virtual | ~ListeningConnection () |
| Destructor. | |
| bool | isAlive () |
| returns wheter the conenction is still open | |
| void | setLocalPort (unsigned short port) |
| sets the local port | |
| unsigned short | getLocalPort () |
| returns the port the connection listens on | |
| void | registerBiDirectionalConnectionReceiver (BiDirectionalConnectionReceiver *receiver) |
| registers a BiDirectional connection receiver | |
| void | unregisterBiDirectionalConnectionReceiver (BiDirectionalConnectionReceiver *receiver) |
| unregisters a bidirectional connection receiver | |
| bool | startListening () |
| starts the listening thread | |
| void | stopListening () |
| stops the listening thread | |
| void | listening () |
| the listening thread implementation | |
| void * | run () |
| internal use only ( threading ) | |
Protected Member Functions | |
| ListeningConnection (const ListeningConnection &connection) | |
Protected Attributes | |
| int | socket_ |
| socket descriptor | |
|
|
copy constructor hidden |
|
|
Constructor. sets up members |
|
|
Destructor. disconnects and closes the listening thread |
|
|
returns the port the connection listens on
|
|
|
returns wheter the conenction is still open
|
|
|
registers a BiDirectional connection receiver this method will register a bidirectional connection receiver. if an incoming connection is accepted in the listening thread it will be passed to all registered receivers. call this before starting to listen. |
|
|
sets the local port this should be called prior to a call to startListening. it will define what port the connection should listen on. calls to this method while the connection is listening are ignored
|
|
|
starts the listening thread this will start the listening thread that is waiting for incoming connections. as long as no connection receiver is registered the thread will not accept any incoming connections. |
|
|
stops the listening thread this will stop the listening thread and close the connection |
|
|
unregisters a bidirectional connection receiver this will delete the given receiver from the receivers list. the receiver will not receive any incoming connections anymore |
1.4.5