34 #ifndef ASYNC_TCP_SERVER_INCLUDED
35 #define ASYNC_TCP_SERVER_INCLUDED
46 #include <sigc++/sigc++.h>
159 int writeAll(
const void *buf,
int count);
190 SigC::Signal2<void, TcpConnection *,TcpConnection::DisconnectReason>
197 typedef std::vector<TcpConnection*> TcpConnectionList;
201 TcpConnectionList tcpConnectionList;
204 void onConnection(
FdWatch *watch);
A class for handling exiting TCP connections.
int writeAll(const void *buf, int count)
Write data to all connected clients.
TcpServer(const std::string &port_str)
Default constuctor.
SigC::Signal1< void, TcpConnection * > clientConnected
A signal that is emitted when a client connect to the server.
int writeExcept(TcpConnection *con, const void *buf, int count)
Send data to all connected clients except the given client.
A class for creating a TCP server.
~TcpServer(void)
Destructor.
A class for watching file descriptors.
TcpConnection * getClient(unsigned int index)
Get the client object pointer from the server.
Contains a class for handling exiting TCP connections.
int writeOnly(TcpConnection *con, const void *buf, int count)
Send data only to the given client.
DisconnectReason
Reason code for disconnects.
int numberOfClients(void)
Get the number of clients that is connected to the server.
SigC::Signal2< void, TcpConnection *, TcpConnection::DisconnectReason > clientDisconnected
A signal that is emitted when a client disconnect from the server.