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