ap
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: UDPSocket.cpp
- Revision:
- 92:dd5f19874adf
- Parent:
- 90:0a988e4abb72
- Child:
- 96:656011e49d9f
--- a/UDPSocket.cpp Tue Apr 19 18:23:12 2016 -0500 +++ b/UDPSocket.cpp Tue Apr 19 18:23:29 2016 -0500 @@ -75,35 +75,3 @@ } } } - - -void UDPSocket::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 UDPSocket::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); - } -} - -UDPSocket::~UDPSocket() -{ - if (_socket && _send_cb) { - _iface->socket_attach_send(_socket, 0, 0); - } - - if (_socket && _recv_cb) { - _iface->socket_attach_recv(_socket, 0, 0); - } -}