Method
GioSocketset_option
since: 2.36
Declaration [src]
gboolean
g_socket_set_option (
  GSocket* socket,
  gint level,
  gint optname,
  gint value,
  GError** error
)
Description [src]
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 <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.
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.