Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lwip/Core/TCPItem.h
- Revision:
- 0:9cf1d79ebe04
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lwip/Core/TCPItem.h Thu Sep 08 08:57:21 2011 +0000 @@ -0,0 +1,32 @@ +#ifndef TCPITEM_H +#define TCPITEM_H + +#include "arch/cc.h" +#include "lwip/err.h" +#include "lwip/tcp.h" + +namespace mbed { + class NetServer; + + /** + * A simple object which provides the base for all TCP enabled objects. + * Do not ues it directly unless you know what you doing. + * Normaly what you want to use is TCPListener or TCPConnector. + */ + class TCPItem { + public: + TCPItem() : _pcb(NULL) {} + TCPItem(struct tcp_pcb *pcb) : _pcb(pcb) {} + virtual ~TCPItem() {} + + void abort() const; + void release_callbacks() const; + err_t close(); + void open(); + protected: + struct tcp_pcb *_pcb; + }; + +}; + +#endif /* TCPITEM_H */