

The standard library When api defines a simpler alternative to the Winix_Io interface for finding I/O descriptors ready for reading or writing.
When is not intended to replace Winix_Io in all applications, just to simplify many simple common cases.
The When api is implemented by the when package.
The When api source code is in src/lib/src/when.api.
See also: Winix_Io.
The above information is manually maintained and may contain errors.
api { When_Rule (X, Y)
= BINARY_STREAM_IS_READ_READY (binary_io::Input_Stream , (Void -> Void))
| BINARY_STREAM_IS_WRITE_READY (binary_io::Output_Stream , (Void -> Void))
| FD_HAS_OOBD_READY (Int , (Void -> Void))
| FD_IS_READ_READY (Int , (Void -> Void))
| FD_IS_WRITE_READY (Int , (Void -> Void))
| IOD_HAS_OOBD_READY (Int , (Void -> Void))
| IOD_IS_READ_READY (Int , (Void -> Void))
| IOD_IS_WRITE_READY (Int , (Void -> Void))
| NONBLOCKING
| SOCKET_HAS_OOBD_READY (?.pre_socket::Socket((X, Y) ) , (Void -> Void))
| SOCKET_IS_READ_READY (?.pre_socket::Socket((X, Y) ) , (Void -> Void))
| SOCKET_IS_WRITE_READY (?.pre_socket::Socket((X, Y) ) , (Void -> Void))
| STREAM_IS_READ_READY (Input_Stream , (Void -> Void))
| STREAM_IS_WRITE_READY (Output_Stream , (Void -> Void))
| TIMEOUT_SECS Float;
timeout_secs : Float -> When_Rule((X, Y) );
fd_is_read_ready : Int -> (Void -> Void) -> When_Rule((X, Y) );
fd_is_write_ready : Int -> (Void -> Void) -> When_Rule((X, Y) );
fd_has_oobd_ready : Int -> (Void -> Void) -> When_Rule((X, Y) );
iod_is_read_ready : Int -> (Void -> Void) -> When_Rule((X, Y) );
iod_is_write_ready : Int -> (Void -> Void) -> When_Rule((X, Y) );
iod_has_oobd_ready : Int -> (Void -> Void) -> When_Rule((X, Y) );
stream_is_read_ready : Input_Stream -> (Void -> Void) -> When_Rule((X, Y) );
stream_is_write_ready : Output_Stream -> (Void -> Void) -> When_Rule((X, Y) );
binary_stream_is_read_ready : binary_io::Input_Stream
-> (Void -> Void) -> When_Rule((X, Y) );
binary_stream_is_write_ready : binary_io::Output_Stream
-> (Void -> Void) -> When_Rule((X, Y) );
socket_is_read_ready : ?.pre_socket::Socket((X, Y) ) -> (Void -> Void) -> When_Rule((X, Y) );
socket_is_write_ready : ?.pre_socket::Socket((X, Y) ) -> (Void -> Void) -> When_Rule((X, Y) );
socket_has_oobd_ready : ?.pre_socket::Socket((X, Y) ) -> (Void -> Void) -> When_Rule((X, Y) );
when : List(When_Rule((X, Y) ) )
-> {oobds_done:Int, reads_done:Int, writes_done:Int};
};

