Wrapper of NetworkSocketAPI for BSD sockets on POSIX systems
Dependents: BSDInterfaceTests HelloBSDInterface
Revision 6:363dd62309cf, committed 2016-04-01
- Comitter:
- geky
- Date:
- Fri Apr 01 17:30:01 2016 +0000
- Parent:
- 5:1af10f9d9404
- Commit message:
- Matched changes to NSAPI
Changed in this revision
BSDInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BSDInterface.cpp Thu Feb 25 19:10:07 2016 -0600 +++ b/BSDInterface.cpp Fri Apr 01 17:30:01 2016 +0000 @@ -155,7 +155,7 @@ return NS_ERROR_DEVICE_ERROR; } - return 0; + return size; } int32_t BSDInterface::BSDSocket::recv(void *data, uint32_t size) @@ -165,7 +165,7 @@ if (ret > 0) { return ret; } else if (errno == EAGAIN) { - return 0; + return NS_ERROR_WOULD_BLOCK; } else { return NS_ERROR_DEVICE_ERROR; }