#include <scim_socket.h>
Inheritance diagram for scim::SocketServer:
Public Member Functions | |
SocketServer (int max_clients=-1) | |
Default constructor, do nothing. | |
SocketServer (const SocketAddress &address, int max_clients=-1) | |
Constructor. | |
~SocketServer () | |
Destructor. | |
bool | valid () |
Test if the server is valid. | |
bool | create (const SocketAddress &address) |
Create a socket on an address. | |
bool | run () |
Run the server. | |
bool | is_running () const |
Check if the server is running. | |
void | shutdown () |
Shutdown the server. | |
void | close_connection (const Socket &socket) |
Close a client connection. | |
int | get_error_number () const |
Get the number of the last occurred error. | |
String | get_error_message () const |
Get the message of the last occurred error. | |
int | get_max_clients () const |
Get the max number of socket clients. | |
void | set_max_clients (int max_clients) |
Set the max number of clients. | |
Connection | signal_connect_accept (SocketServerSlotSocket *slot) |
Connect a slot to socket accept signal. | |
Connection | signal_connect_receive (SocketServerSlotSocket *slot) |
Connect a slot to socket receive signal. | |
Connection | signal_connect_exception (SocketServerSlotSocket *slot) |
Connect a slot to socket exception signal. |
Class SocketServer provides basic operations to create a Socket Server, such as create, run etc.
Definition at line 329 of file scim_socket.h.
|
Default constructor, do nothing.
|
|
Constructor.
|
|
Destructor.
|
|
Test if the server is valid.
|
|
Create a socket on an address.
|
|
Run the server.
|
|
Check if the server is running.
|
|
Shutdown the server.
|
|
Close a client connection.
|
|
Get the number of the last occurred error.
Reimplemented from scim::Socket. |
|
Get the message of the last occurred error.
Reimplemented from scim::Socket. |
|
Get the max number of socket clients.
|
|
Set the max number of clients.
|
|
Connect a slot to socket accept signal. Connect a slot to socket accept signal, if a client connection is accepted, this signal will be emitted.
|
|
Connect a slot to socket receive signal. Connect a slot to socket receive signal, if a client send data to this server, this signal will be emitted.
|
|
Connect a slot to socket exception signal. Connect a slot to socket exception signal, if an exception was occurred to a client connection, this signal will be emitted.
|