TcpServer.h
Go to the documentation of this file.
25 // By default a TCP server will wait for a new remote client connection to get established for 20 seconds
36 TcpServer(TcpClientConnectDelegate onClientHandler, TcpClientDataDelegate clientReceiveDataHandler,
38 : TcpConnection(false), clientConnectDelegate(onClientHandler), clientReceiveDelegate(clientReceiveDataHandler),
44 TcpServer(TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler)
uint16_t timeOut
By default a TCP connection does not have a time out.
Definition: TcpConnection.h:199
virtual void onClient(TcpClient *client)
TcpServer(TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler)
Definition: TcpServer.h:44
void shutdown()
virtual err_t onAccept(tcp_pcb *clientTcp, err_t err)
Definition: TcpConnection.h:39
TcpServer(TcpClientDataDelegate clientReceiveDataHandler)
Definition: TcpServer.h:51
Definition: TcpClient.h:46
virtual void onClientDestroy(TcpConnection &connection)
virtual bool onClientReceive(TcpClient &client, char *data, int size)
Definition: TcpServer.h:28
void setKeepAlive(uint16_t seconds)
virtual bool listen(int port, bool useSsl=false)
TcpServer(TcpClientConnectDelegate onClientHandler, TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler)
Definition: TcpServer.h:36
virtual void onClientComplete(TcpClient &client, bool successful)
uint16_t maxConnections
By default, don't limit connection count.
Definition: TcpServer.h:91
Delegate< void(TcpClient *client)> TcpClientConnectDelegate
Definition: TcpServer.h:23
const Vector< TcpConnection * > & getConnections() const
Definition: TcpServer.h:68
virtual TcpConnection * createClient(tcp_pcb *clientTcp)