# Data structure used by the poll function
private extern class NativeSocketPollFD `{ struct pollfd * `}
# File descriptor
fun fd: Int `{ return self->fd; `}
# List of events to be watched
fun events: Int `{ return self->events; `}
# List of events received by the last poll function
fun revents: Int `{ return self->revents; `}
new (pid: Int, events: NativeSocketPollValues) `{
struct pollfd *poll = malloc(sizeof(struct pollfd));
poll->fd = pid;
poll->events = events;
return poll;
`}
end
lib/socket/socket_c.nit:88,1--106,3