ap
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: Socket.h
- Branch:
- api-changes
- Revision:
- 48:b3bbe28a7963
- Parent:
- 43:09ea32f2eb54
- Child:
- 53:26b5f1c69822
--- a/Socket.h Thu Feb 25 21:58:46 2016 +0000 +++ b/Socket.h Thu Feb 25 03:13:26 2016 -0600 @@ -73,17 +73,18 @@ /** Send data over the socket * @param data Buffer of data to send - * @param len Size of data to send + * @param size Size of data to send * @return 0 on success */ - int32_t send(const void *data, uint32_t len); + int32_t send(const void *data, uint32_t size); /** Recieve data over the socket * @param data Buffer to store recieved data - * @param len Size of provided buffer - * @return Number of bytes sent or a negative value on failure + * @param size Size of provided buffer + * @param blocking If true wait for data, otherwise return 0 if no data is available + * @return Number of bytes recieved or a negative value on failure */ - int32_t recv(void *data, uint32_t len); + int32_t recv(void *data, uint32_t size, bool blocking = true); protected: