Did you try clearing the O_NONBLOCK flag?
opts = opts & (~O_NONBLOCK)
More Related Contents:
- Are parallel calls to send/recv on the same socket valid?
- close vs shutdown socket?
- How to make an HTTP get request in C without libcurl?
- Where to find the complete definition of off_t type?
- Releasing bound ports on process exit
- Understanding htonl() and ntohl()
- Connection refused – tcp socket in linux [closed]
- C non-blocking keyboard input
- An existing connection was forcibly closed by the remote host
- Differ between header and content of http server response (sockets)
- How to set socket timeout in C when making multiple connections?
- Wake up thread blocked on accept() call
- Understanding INADDR_ANY for socket programming
- Why do we cast sockaddr_in to sockaddr when calling bind()?
- Turn a simple socket into an SSL socket
- using C code to get same info as ifconfig
- Linux: is there a read or recv from socket with timeout?
- How to signal select() to return immediately?
- Socketpair() in C/Unix
- Problems with SO_BINDTODEVICE Linux socket option
- How large should my recv buffer be when calling recv in the socket library
- close() is not closing socket properly
- Is it possible to access/update the child thread’s resource from parent thread?
- Why is it assumed that send may return with less than requested data transmitted on a blocking socket?
- bind socket to network interface
- Strange RAW Socket on Mac OS X
- What can cause a “Resource temporarily unavailable” on sock send() command
- Bind error while recreating socket
- How can I access netstat-like Ethernet statistics from a Windows program
- What is the difference between AF_INET and PF_INET in socket programming?