get_option
Description:
public bool get_option (int level, int optname, out int value) throws Error
Gets the value of an integer-valued option on this, as with getsockopt
.
(If you need to fetch a non-integer-valued option, you will need to call getsockopt
directly.)
The <gio/gnetworking.h> header pulls in system headers that will define most of the standard/portable socket options. For unusual socket protocols or platform-dependent options, you may need to include additional headers.
Note that even for socket options that are a single byte in size, value
is still a pointer to a
int variable, not a uchar;
get_option will handle the conversion internally.
Parameters:
this |
a Socket |
level |
the "API level" of the option (eg, `SOL_SOCKET`) |
optname |
the "name" of the option (eg, `SO_BROADCAST`) |
value |
return location for the option value |
Returns:
success or failure. On failure, throws will be set, and the system error value (`errno` or |