Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

GLib::SocketConnection

class GLib::SocketConnection

GLib::SocketConnection is a GLib::IOStream for a connected socket. They can be created either by GLib::SocketClient when connecting to a host, or by GLib::SocketListener when accepting a new client.

The type of the GLib::SocketConnection 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 GLib::TcpConnection.

Instance Methods

local_address

Try to get the local address of a socket connection.

A GLib::IO::Error is raised if the local address can’t be determined.

Since 2.22

remote_address

Try to get the remote address of a socket connection.

A GLib::IO::Error is raised if the remote address can’t be determined.

Since 2.22

socket
Gets the underlying GLib::Socket.
  • Returns: The underlying GSocket