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