A version of LWIP, provided for backwards compatibility.

Dependents:   AA_DemoBoard DemoBoard HelloServerDemo DemoBoard_RangeIndicator ... more

Committer:
root@mbed.org
Date:
Tue May 08 15:32:10 2012 +0100
Revision:
0:5e1631496985
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
root@mbed.org 0:5e1631496985 1 #include "TCPItem.h"
root@mbed.org 0:5e1631496985 2
root@mbed.org 0:5e1631496985 3 using namespace std;
root@mbed.org 0:5e1631496985 4 using namespace mbed;
root@mbed.org 0:5e1631496985 5
root@mbed.org 0:5e1631496985 6 void TCPItem::abort() const {
root@mbed.org 0:5e1631496985 7 tcp_abort(this->_pcb);
root@mbed.org 0:5e1631496985 8 }
root@mbed.org 0:5e1631496985 9
root@mbed.org 0:5e1631496985 10 void TCPItem::release_callbacks() const {
root@mbed.org 0:5e1631496985 11 tcp_arg(this->_pcb, NULL);
root@mbed.org 0:5e1631496985 12 tcp_sent(this->_pcb, NULL);
root@mbed.org 0:5e1631496985 13 tcp_recv(this->_pcb, NULL);
root@mbed.org 0:5e1631496985 14 tcp_poll(this->_pcb, NULL, 255);
root@mbed.org 0:5e1631496985 15 tcp_accept(this->_pcb, NULL);
root@mbed.org 0:5e1631496985 16 tcp_err(this->_pcb, NULL);
root@mbed.org 0:5e1631496985 17 }
root@mbed.org 0:5e1631496985 18
root@mbed.org 0:5e1631496985 19 err_t TCPItem::close() {
root@mbed.org 0:5e1631496985 20 err_t err = tcp_close(this->_pcb);
root@mbed.org 0:5e1631496985 21 this->_pcb = NULL;
root@mbed.org 0:5e1631496985 22 return err;
root@mbed.org 0:5e1631496985 23 }
root@mbed.org 0:5e1631496985 24
root@mbed.org 0:5e1631496985 25 void TCPItem::open() {
root@mbed.org 0:5e1631496985 26 if(!this->_pcb) {
root@mbed.org 0:5e1631496985 27 this->_pcb = tcp_new();
root@mbed.org 0:5e1631496985 28 tcp_arg(this->_pcb, this);
root@mbed.org 0:5e1631496985 29 }
root@mbed.org 0:5e1631496985 30 }