version_2.0
Dependents: cc3000_ping_demo_try_2
Fork of cc3000_hostdriver_mbedsocket by
Diff: Socket/Socket.cpp
- Revision:
- 16:f3676ae62f96
- Parent:
- 13:5e36c267e62f
- Parent:
- 12:1c2a856c618a
- Child:
- 17:14b6a3a2b622
diff -r aae737ca3dd2 -r f3676ae62f96 Socket/Socket.cpp --- a/Socket/Socket.cpp Wed Oct 02 15:29:26 2013 +0000 +++ b/Socket/Socket.cpp Wed Oct 02 16:00:41 2013 +0000 @@ -50,11 +50,11 @@ } int Socket::set_option(int level, int optname, const void *optval, socklen_t optlen) { - return _cc3000_module->_socket.set_sockopt(_sock_fd, level, optname, optval, optlen); + return _cc3000_module->_socket.setsockopt(_sock_fd, level, optname, optval, optlen); } int Socket::get_option(int level, int optname, void *optval, socklen_t *optlen) { - return _cc3000_module->_socket.get_sockopt(_sock_fd, level, optname, optval, optlen); + return _cc3000_module->_socket.getsockopt(_sock_fd, level, optname, optval, optlen); } int Socket::select(struct timeval *timeout, bool read, bool write) { @@ -70,9 +70,9 @@ fd_set* writeset = (write) ? (&fdSet) : (NULL); int ret = _cc3000_module->_socket.select(_sock_fd+1, readset, writeset, NULL, timeout); - + DBG_SOCKET("Select on sock_fd: %d, returns %d. fdSet: %d", _sock_fd, ret, fdSet); - + // TODO //return (ret <= 0 || !FD_ISSET(_sock_fd, &fdSet)) ? (-1) : (0); if (FD_ISSET(_sock_fd, &fdSet)) {