Socket.this

this(void * ptr, Flag!"Take" take)
No documentation available for this declaration.

Creates a new #GSocket with the defined family, type and protocol. If protocol is 0 (gio.types.SocketProtocol.Default) the default protocol type for the family and type is used.

The protocol is a family and type specific int that specifies what kind of protocol to use. #GSocketProtocol lists several common ones. Many families only support one protocol, and use 0 for this, others support several and using 0 means to use the default protocol for the family and type.

The protocol id is passed directly to the operating system, so you can use protocols not listed in #GSocketProtocol if you know the protocol number used for it.

Parameters

familythe socket family to use, e.g. gio.types.SocketFamily.Ipv4.
typethe socket type to use.
protocolthe id of the protocol to use, or 0 for default.

Returns

a #GSocket or null on error.

Free the returned object with gobject.object.ObjectWrap.unref.

Throws