![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Control of mbed using OSC. Based on code from the Make Controller. Right now you can turn the onboard LEDs on/off and toggle 8 digital out pins. More I/O will be done in the future.
lwip/TCPListener.h
- Committer:
- pehrhovey
- Date:
- 2010-03-17
- Revision:
- 0:439354122597
File content as of revision 0:439354122597:
#ifndef TCPLISTENER_H #define TCPLISTENER_H #include "TCPItem.h" #include "arch/cc.h" #include "lwip/err.h" #include "lwip/tcp.h" namespace mbed { class NetServer; class TCPConnection; class TCPListener : public TCPItem { public: TCPListener(u16_t port) : _port(port) { } virtual ~TCPListener() {} void bind(); protected: /** * Function to call when a listener has been connected. * @param err an error argument (TODO: that is current always ERR_OK?) * @return ERR_OK: accept the new connection, * any other err_t abortsthe new connection */ virtual err_t accept(struct tcp_pcb *, err_t err) = 0; u16_t _port; private: static err_t accept_callback(void *arg, struct tcp_pcb *newpcb, err_t err); friend NetServer; friend TCPConnection; }; }; #endif /* TCPLISTENER_H */