condition_check


Description:

public IOCondition condition_check (IOCondition condition)

Checks on the readiness of this to perform operations.

The operations specified in condition are checked for and masked against the currently-satisfied conditions on this. The result is returned.

Note that on Windows, it is possible for an operation to return g_io_error_would_block even immediately after condition_check has claimed that the socket is ready for writing. Rather than calling condition_check and then writing to the socket if it succeeds, it is generally better to simply try writing to the socket right away, and try again later if the initial attempt returns g_io_error_would_block.

It is meaningless to specify g_io_err or g_io_hup in condition; these conditions will always be set in the output if they are true.

This call never blocks.

Parameters:

this

a Socket

condition

a IOCondition mask to check

Returns:

the GIOCondition mask of the current state