W Wrapl, The Programming Language

Libraries:Gtk:Gio:GSocketConnection

Types

T

Inherits from:

T is a Gtk.Gio.GIOStream.T for a connected socket. They can be created either by Gtk.Gio.GSocketClient.T when connecting to a host, or by Gtk.Gio.GSocketListener.T when accepting a new client.

The type of the T object returned from these calls depends on the type of the underlying socket that is in use. For instance, for a TCP/IP connection it will be a Gtk.Gio.GTcpConnection.T.

Choosing what type of object to construct is done with the socket connection factory, and it is possible for 3rd parties to register custom socket connection types for specific combination of socket family/type/protocol using FactoryRegisterType.



Constants

Nil : T

Functions

FactoryCreateConnection(socket @ Gtk.Gio.GSocket.T) : Gtk.Gio.GSocketConnection.T

Creates a T subclass of the right type for socket.

socket a Gtk.Gio.GSocket.T
Returns a T. [transfer full]


FactoryLookupType(family @ Gtk.Gio.GSocketFamily.T, type @ Gtk.Gio.GSocketType.T, protocol_id @ Std.Integer.SmallT) : Gtk.GObject.Type.T

Looks up the GType to be used when creating socket connections on sockets with the specified family, type and protocol_id.

If no type is registered, the T base type is returned.

family a Gtk.Gio.GSocketFamily.T
type a Gtk.Gio.GSocketType.T
protocol_id a protocol id
Returns a GType


FactoryRegisterType(g_type @ Gtk.GObject.Type.T, family @ Gtk.Gio.GSocketFamily.T, type @ Gtk.Gio.GSocketType.T, protocol @ Std.Integer.SmallT) : Std.Object.T

Looks up the GType to be used when creating socket connections on sockets with the specified family, type and protocol.

If no type is registered, the T base type is returned.

g_type a GType, inheriting from G_TYPE_SOCKET_CONNECTION
family a Gtk.Gio.GSocketFamily.T
type a Gtk.Gio.GSocketType.T
protocol a protocol id


GetType() : Gtk.GObject.Type.T



Methods

:GetLocalAddress(self @ T, error @ Std.Object.T) : Gtk.Gio.GSocketAddress.T

Try to get the local address of a socket connection.

connection a T
error Gtk.Glib.GError.T for error reporting, or NULL to ignore.
Returns a Gtk.Gio.GSocketAddress.T or NULL on error. Free the returned object with g_object_unref(). [transfer full]


:GetRemoteAddress(self @ T, error @ Std.Object.T) : Gtk.Gio.GSocketAddress.T

Try to get the remote address of a socket connection.

connection a T
error Gtk.Glib.GError.T for error reporting, or NULL to ignore.
Returns a Gtk.Gio.GSocketAddress.T or NULL on error. Free the returned object with g_object_unref(). [transfer full]


:GetSocket(self @ T) : Gtk.Gio.GSocket.T

Gets the underlying Gtk.Gio.GSocket.T object of the connection. This can be useful if you want to do something unusual on it not supported by the T APIs.

connection a T
Returns a Gtk.Gio.GSocketAddress.T or NULL on error. [transfer none]


:Priv(self @ T) : Std.Object.T

:setPriv(self @ T, value @ Std.Object.T) : Std.Object.T