Skip to content

Commit

Permalink
[add] - implement set_non_blocking for socket
Browse files Browse the repository at this point in the history
  • Loading branch information
Memphiz authored and sahlberg committed Sep 3, 2011
1 parent f5a4885 commit 99c14c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/socket.c
Expand Up @@ -66,9 +66,11 @@ static int rpc_disconnect_requeue(struct rpc_context *rpc);

static void set_nonblocking(int fd)
{
int v = 0;
#if defined(WIN32)
long nonblocking=1;
v = ioctlsocket(fd, FIONBIO,&nonblocking);
#else
unsigned v;
v = fcntl(fd, F_GETFL, 0);
fcntl(fd, F_SETFL, v | O_NONBLOCK);
#endif //FIXME
Expand Down

0 comments on commit 99c14c9

Please sign in to comment.