TcpConnection

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

Constructors

this
this(GTcpConnection* gTcpConnection, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

getGracefulDisconnect
bool getGracefulDisconnect()

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

getStruct
void* getStruct()

the main Gtk struct as a void*

getTcpConnectionStruct
GTcpConnection* getTcpConnectionStruct(bool transferOwnership)

Get the main Gtk struct

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.

Static functions

getType
GType getType()

Variables

gTcpConnection
GTcpConnection* gTcpConnection;

the main Gtk struct

Inherited Members

From SocketConnection

gSocketConnection
GSocketConnection* gSocketConnection;

the main Gtk struct

getSocketConnectionStruct
GSocketConnection* getSocketConnectionStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
factoryLookupType
GType factoryLookupType(GSocketFamily family, GSocketType 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(GType gType, GSocketFamily family, GSocketType 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(SocketAddress address, Cancellable cancellable)

Connect connection to the specified remote address.

connectAsync
void connectAsync(SocketAddress address, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously connect connection to the specified remote address.

connectFinish
bool connectFinish(AsyncResultIF result)

Gets the result of a Socket.connectionConnectAsync call.

getLocalAddress
SocketAddress getLocalAddress()

Try to get the local address of a socket connection.

getRemoteAddress
SocketAddress getRemoteAddress()

Try to get the remote address of a socket connection.

getSocket
Socket getSocket()

Gets the underlying atk.Socket object of the connection. This can be useful if you want to do something unusual on it not supported by the gio.SocketConnection APIs.

isConnected
bool isConnected()

Checks if connection is connected. This is equivalent to calling Socket.isConnected on connection's underlying atk.Socket

Meta

Since

2.22