Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

int nl_socket_set_nonblocking ( struct nl_sock *  sk  ) 

Set file descriptor of socket to non-blocking state

  • sk Netlink socket.
0 on success or a negative error code.

Definition at line 419 of file socket.c.

Referenced by nl_cache_mngr_alloc().

      if (sk->s_fd == -1)
            return -NLE_BAD_SOCK;

      if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0)
            return -nl_syserr2nlerr(errno);

      return 0;

Generated by  Doxygen 1.6.0   Back to index