27 #ifndef ASYNC_TCP_SERVER_BASE_INCLUDED 28 #define ASYNC_TCP_SERVER_BASE_INCLUDED 39 #include <sigc++/sigc++.h> 147 int writeAll(
const void *buf,
int count);
169 uint16_t remote_port) = 0;
174 typedef std::vector<TcpConnection*> TcpConnectionList;
178 TcpConnectionList tcpConnectionList;
181 void onConnection(
FdWatch *watch);
A class for handling exiting TCP connections.
int writeOnly(TcpConnection *con, const void *buf, int count)
Send data only to the given client.
int writeExcept(TcpConnection *con, const void *buf, int count)
Send data to all connected clients except the given client.
TcpConnection * getClient(unsigned int index)
Get the client object pointer from the server.
virtual ~TcpServerBase(void)
Destructor.
void removeConnection(TcpConnection *con)
A class for watching file descriptors.
void addConnection(TcpConnection *con)
int writeAll(const void *buf, int count)
Write data to all connected clients.
Contains a class for handling exiting TCP connections.
Namespace for the asynchronous programming classes.
int numberOfClients(void)
Get the number of clients that is connected to the server.
virtual void createConnection(int sock, const IpAddress &remote_addr, uint16_t remote_port)=0
A class for representing an IP address in an OS independent way.
The base class for creating a TCP server.
TcpServerBase(const std::string &port_str, const Async::IpAddress &bind_ip)
Default constuctor.