Method: Nmsg::Socket#get_sysfd
- Defined in:
- ext/nmsg/rubyext.c
#get_sysfd ⇒ Object
252 253 254 255 256 257 258 259 |
# File 'ext/nmsg/rubyext.c', line 252
VALUE rb_socket_get_sysfd(VALUE self) {
GET_SOCKET(self);
int optval;
size_t optval_len = sizeof(int);
const int res = nn_getsockopt(S->fd, NN_SOL_SOCKET, NN_RCVFD, (void *)&optval, &optval_len);
return INT2NUM((res == 0) ? optval : -1);
}
|