send_message_with_timeout
Description:
public PollableReturn send_message_with_timeout (SocketAddress? address, OutputVector[] vectors, SocketControlMessage[]? messages, int flags, int64 timeout_us, out size_t bytes_written, Cancellable? cancellable = null) throws Error
This behaves exactly the same as send_message, except that the choice of
timeout behavior is determined by the timeout_us argument rather than by this's properties.
On error g_pollable_return_failed is returned and throws is set
accordingly, or if the socket is currently not writable g_pollable_return_would_block is returned.
bytes_written will contain 0 in both cases.
Parameters:
| this |
a Socket |
| address |
a SocketAddress, or null |
| vectors |
an array of OutputVector structs |
| messages |
a pointer to an array of SocketControlMessages, or null. |
| flags |
an int containing SocketMsgFlags flags, which may additionally contain other platform specific flags |
| timeout_us |
the maximum time (in microseconds) to wait, or -1 |
| bytes_written |
location to store the number of bytes that were written to the socket |
| cancellable |
a gcancellable or null |
| num_messages |
number of elements in |
| num_vectors |
the number of elements in |
Returns:
|
g_pollable_return_ok if all data was successfully written, g_pollable_return_would_block if the socket is currently not writable, or g_pollable_return_failed if an error happened and throws is set. |