A server TCP socket for accepting incoming connections. More...
#include <Radiant/TCPServerSocket.hpp>
Public Member Functions | |
| TCPSocket * | accept () |
| Accepts new connections. More... | |
| bool | close () |
| Closes the socket. More... | |
| const QString | host () const |
| Returns the hostname. More... | |
| bool | isOpen () const |
| Returns true of the socket is open. More... | |
| bool | isPendingConnection (unsigned int waitMicroSeconds=0) |
| Check for pending connections Checks for pending connections and optionally blocks for the given timeout. More... | |
| int | open (const char *host, int port, int maxconnections=2) |
| Opens a server TCP socket to desired host:port. More... | |
| int | port () const |
| Returns the port number. More... | |
| TCPServerSocket () | |
| Constructor. | |
| ~TCPServerSocket () | |
| Destructor. | |
A server TCP socket for accepting incoming connections.
| TCPSocket* Radiant::TCPServerSocket::accept | ( | ) |
Accepts new connections.
Blocks until a connection is received or the socket is closed.
| bool Radiant::TCPServerSocket::close | ( | ) |
Closes the socket.
| const QString Radiant::TCPServerSocket::host | ( | ) | const |
Returns the hostname.
| bool Radiant::TCPServerSocket::isOpen | ( | ) | const |
Returns true of the socket is open.
| bool Radiant::TCPServerSocket::isPendingConnection | ( | unsigned int | waitMicroSeconds = 0 | ) |
Check for pending connections Checks for pending connections and optionally blocks for the given timeout.
| waitMicroSeconds | micro seconds to block |
| int Radiant::TCPServerSocket::open | ( | const char * | host, |
| int | port, | ||
| int | maxconnections = 2 |
||
| ) |
Opens a server TCP socket to desired host:port.
| host | Hostname |
| port | Port number |
| maxconnections | Maximum number of pending connections |
| int Radiant::TCPServerSocket::port | ( | ) | const |
Returns the port number.