#include <faith/serversocket.h>
Inheritance diagram for Faith::ServerSocket:

Public Slots | |
| void | close () |
Signals | |
| virtual void | newConnection (int fd) |
Public Member Functions | |
| ServerSocket (const Faith::String &address, int port, Object *parent=0) | |
| ServerSocket (int port, Object *parent=0) | |
| ~ServerSocket () | |
| Socket::SocketError | error () const |
| void | setAddress (const Faith::String &address, int port) |
| bool | listen () |
| Faith::ServerSocket::ServerSocket | ( | const Faith::String & | address, | |
| int | port, | |||
| Object * | parent = 0 | |||
| ) |
makes a socket that can accept connections on address and port
| Faith::ServerSocket::ServerSocket | ( | int | port, | |
| Object * | parent = 0 | |||
| ) |
makes a socket that can accept connections port on any address
| Faith::ServerSocket::~ServerSocket | ( | ) |
| void Faith::ServerSocket::close | ( | ) | [slot] |
stop accepting connections
| Socket::SocketError Faith::ServerSocket::error | ( | ) | const [inline] |
| bool Faith::ServerSocket::listen | ( | ) |
Begin accepting connections
| virtual void Faith::ServerSocket::newConnection | ( | int | fd | ) | [virtual, signal] |
emitted when there is a new connection. The file descriptor is fd which can be passed to Socket's constructor
You may also reimplement this virtual method
| void Faith::ServerSocket::setAddress | ( | const Faith::String & | address, | |
| int | port | |||
| ) |
sets the address to listen on, if not set by the constructor. passing an empty string for address will cause the socket to listen on all addresses
1.4.7