NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: TCPSocket.cpp
- Revision:
- 92:dd5f19874adf
- Parent:
- 90:0a988e4abb72
- Child:
- 96:656011e49d9f
--- a/TCPSocket.cpp Tue Apr 19 18:23:12 2016 -0500 +++ b/TCPSocket.cpp Tue Apr 19 18:23:29 2016 -0500 @@ -90,37 +90,3 @@ } } } - - -void TCPSocket::attach_send(FunctionPointer callback) -{ - _send_cb = callback; - - if (_socket && _send_cb) { - return _iface->socket_attach_send(_socket, Socket::thunk, &_send_cb); - } else if (_socket) { - return _iface->socket_attach_send(_socket, 0, 0); - } -} - -void TCPSocket::attach_recv(FunctionPointer callback) -{ - _recv_cb = callback; - - if (_socket && _recv_cb) { - return _iface->socket_attach_recv(_socket, Socket::thunk, &_recv_cb); - } else if (_socket) { - return _iface->socket_attach_recv(_socket, 0, 0); - } -} - -TCPSocket::~TCPSocket() -{ - if (_socket && _send_cb) { - _iface->socket_attach_send(_socket, 0, 0); - } - - if (_socket && _recv_cb) { - _iface->socket_attach_recv(_socket, 0, 0); - } -}