Ethernet interface for W5500 with bug fixed in socket::close()
Fork of EthernetInterfaceW5500 by
Diff: Socket/TCPSocketServer.h
- Revision:
- 12:d130abe9d4a8
- Parent:
- 1:fb4494783863
--- a/Socket/TCPSocketServer.h Thu Jul 17 07:13:27 2014 +0000 +++ b/Socket/TCPSocketServer.h Mon Jul 21 05:12:11 2014 +0000 @@ -23,30 +23,34 @@ /** TCP Server. */ -class TCPSocketServer : public Socket { - public: +class TCPSocketServer : public Socket +{ +public: /** Instantiate a TCP Server. */ TCPSocketServer(); - + /** Bind a socket to a specific port. \param port The port to listen for incoming connections on. \return 0 on success, -1 on failure. */ int bind(int port); - + /** Start listening for incoming connections. \param backlog number of pending connections that can be queued up at any one time [Default: 1]. \return 0 on success, -1 on failure. */ int listen(int backlog=1); - + /** Accept a new connection. \param connection A TCPSocketConnection instance that will handle the incoming connection. \return 0 on success, -1 on failure. */ int accept(TCPSocketConnection& connection); +private : + int listen_port; + }; #endif