Method
GioSocketset_option
since: 2.36
Declaration
gboolean
g_socket_set_option (
GSocket* socket,
gint level,
gint optname,
gint value,
GError** error
)
Description
Sets the value of an integer-valued option on socket, as with
setsockopt(). (If you need to set a non-integer-valued option,
you will need to call setsockopt() directly.)
The [
Available since: 2.36
Parameters
level-
Type:
gintThe “API level” of the option (eg,
SOL_SOCKET). optname-
Type:
gintThe “name” of the option (eg,
SO_BROADCAST). value-
Type:
gintThe value to set the option to.
error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.