TcpConnection

This is the subclass of gio.socket_connection.SocketConnection that is created for TCP/IP sockets.

Members

Functions

getGracefulDisconnect
bool getGracefulDisconnect()

Checks if graceful disconnects are used. See gio.tcp_connection.TcpConnection.setGracefulDisconnect.

setGracefulDisconnect
void setGracefulDisconnect(bool gracefulDisconnect)

This enables graceful disconnects on close. A graceful disconnect means that we signal the receiving end that the connection is terminated and wait for it to close the connection before closing the connection.

Inherited Members

From SocketConnection

factoryLookupType
gobject.types.GType factoryLookupType(gio.types.SocketFamily family, gio.types.SocketType type, int protocolId)

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

factoryRegisterType
void factoryRegisterType(gobject.types.GType gType, gio.types.SocketFamily family, gio.types.SocketType type, int protocol)

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

connect
bool connect(gio.socket_address.SocketAddress address, gio.cancellable.Cancellable cancellable)

Connect connection to the specified remote address.

connectAsync
void connectAsync(gio.socket_address.SocketAddress address, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously connect connection to the specified remote address.

connectFinish
bool connectFinish(gio.async_result.AsyncResult result)

Gets the result of a gio.socket_connection.SocketConnection.connectAsync call.

getLocalAddress
gio.socket_address.SocketAddress getLocalAddress()

Try to get the local address of a socket connection.

getRemoteAddress
gio.socket_address.SocketAddress getRemoteAddress()

Try to get the remote address of a socket connection.

getSocket
gio.socket.Socket getSocket()

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

isConnected
bool isConnected()

Checks if connection is connected. This is equivalent to calling gio.socket.Socket.isConnected on connection's underlying #GSocket.