Socket module

FD_ISSET

procedureforeign3 overloadsSource
FD_ISSET :: (fd: SOCKET, unknown0: *fd_set) -> s32 #foreign

Parameters

fd: SOCKET
unknown0: *fd_set

Returns

s32
FD_ISSET :: (fd: s32, set: *fd_set) -> s32

Whether descriptor fd is in set; 0 for a null set and for a descriptor outside the set.

Parameters

fd: s32
set: *fd_set

Returns

s32
FD_ISSET :: (fd: s32, set: *fd_set) -> s32

Returns 1 when descriptor fd is in set and 0 when it is not. A null set, a negative descriptor and one past the set's capacity (usually 1024) count as not in the set. After select returns, use it to ask which descriptors are ready.

Parameters

fd: s32
set: *fd_set

Returns

s32
Example
set: fd_set;

FD_SET(7, *set);
assert(FD_ISSET(7, *set) == 1);
assert(FD_ISSET(8, *set) == 0);
assert(FD_ISSET(100000, *set) == 0);

Doesn't run in the browser (skipped on wasm).

See also