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
38 TcpServer(TcpClientConnectDelegate onClientHandler, TcpClientDataDelegate clientReceiveDataHandler,
40 : TcpConnection(false), clientConnectDelegate(onClientHandler), clientReceiveDelegate(clientReceiveDataHandler),
46 TcpServer(TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler)
virtual err_t onAccept(tcp_pcb *clientTcp, err_t err)
virtual void onClientComplete(TcpClient &client, bool successful)
virtual void onClientDestroy(TcpConnection &connection)
void setKeepAlive(uint16_t seconds)
const Vector< TcpConnection * > & getConnections() const
Definition: TcpServer.h:75
TcpServer(TcpClientDataDelegate clientReceiveDataHandler)
Definition: TcpServer.h:53
virtual bool listen(int port, bool useSsl=false)
TcpServer(TcpClientConnectDelegate onClientHandler, TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler)
Definition: TcpServer.h:38
Definition: TcpClient.h:45
uint16_t timeOut
By default a TCP connection does not have a time out.
Definition: TcpConnection.h:220
uint16_t maxConnections
By default, don't limit connection count.
Definition: TcpServer.h:98
virtual void onClient(TcpClient *client)
Definition: TcpServer.h:30
void setClientReceiveHandler(TcpClientDataDelegate clientReceiveDataHandler)
Definition: TcpServer.h:59
TcpServer(TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler)
Definition: TcpServer.h:46
void shutdown()
Definition: TcpConnection.h:39
virtual bool onClientReceive(TcpClient &client, char *data, int size)
virtual TcpConnection * createClient(tcp_pcb *clientTcp)