Merge pull request #1 from geky/socket-accept-address

network-socket: Peer address update for Nanostack
pull/2434/head
The Infinnovation team 2016-08-12 19:24:36 +01:00 committed by GitHub
commit 9180796684
2 changed files with 4 additions and 3 deletions

View File

@ -846,7 +846,7 @@ int NanostackInterface::socket_connect(void *handle, const SocketAddress &addr)
return ret; return ret;
} }
int NanostackInterface::socket_accept(void **handle, void *server) int NanostackInterface::socket_accept(void *server, void **handle, SocketAddress *address)
{ {
return NSAPI_ERROR_UNSUPPORTED; return NSAPI_ERROR_UNSUPPORTED;
} }

View File

@ -95,11 +95,12 @@ protected:
* This call is non-blocking. If accept would block, * This call is non-blocking. If accept would block,
* NSAPI_ERROR_WOULD_BLOCK is returned immediately. * NSAPI_ERROR_WOULD_BLOCK is returned immediately.
* *
* @param handle Destination for a handle to the newly created sockey
* @param server Socket handle to server to accept from * @param server Socket handle to server to accept from
* @param handle Destination for a handle to the newly created socket
* @param address Destination for the remote address or NULL
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int socket_accept(void **handle, void *server); virtual int socket_accept(void *handle, void **server, SocketAddress *address);
/** Send data over a TCP socket /** Send data over a TCP socket
* *