Match changes to NSAPI in LWIPInterface

mirrored from:
https://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/
pull/2231/head
Christopher Haster 2016-05-10 14:36:08 -05:00
parent a7c07996d9
commit 0d0d008411
3 changed files with 4 additions and 12 deletions

View File

@ -169,6 +169,7 @@ int LWIPInterface::socket_open(void **handle, nsapi_protocol_t proto)
udp_recv(s->udp, udp_recv_irq, s);
*handle = s;
return 0;
case NSAPI_TCP:
s->proto = proto;
@ -180,6 +181,7 @@ int LWIPInterface::socket_open(void **handle, nsapi_protocol_t proto)
tcp_arg(s->tcp, s);
//tcp_err(s->tcp, tcp_error_irq);
*handle = s;
return 0;
}
return NSAPI_ERROR_DEVICE_ERROR;
@ -193,6 +195,7 @@ int LWIPInterface::socket_close(void *handle)
switch (s->proto) {
case NSAPI_UDP:
udp_disconnect(s->udp);
udp_remove(s->udp);
break;
case NSAPI_TCP:
@ -273,11 +276,6 @@ int LWIPInterface::socket_connect(void *handle, const SocketAddress &addr)
return 0;
}
bool LWIPInterface::socket_is_connected(void *handle)
{
return true;
}
int LWIPInterface::socket_accept(void **handle, void *server)
{

View File

@ -85,12 +85,6 @@ protected:
* @return 0 on success, negative on failure
*/
virtual int socket_connect(void *handle, const SocketAddress &address);
/** Check if the socket is connected
* @param handle Socket handle
* @return true if connected, false otherwise
*/
virtual bool socket_is_connected(void *handle);
/** Accept a new connection.
* @param handle Handle in which to store new socket

View File

@ -1,4 +1,4 @@
/* EthernetStack.h */
/* EthernetInterface.h */
/* Copyright (C) 2012 mbed.org, MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software