TcpConnection

Description This is the subclass of GSocketConnection that is created for TCP/IP sockets.

Constructors

this
this(GTcpConnection* gTcpConnection)

Sets our main struct and passes it to the parent class

Members

Functions

getGracefulDisconnect
int getGracefulDisconnect()

Checks if graceful disconnects are used. See g_tcp_connection_set_graceful_disconnect(). Since 2.22

getStruct
void* getStruct()

the main Gtk struct as a void*

getTcpConnectionStruct
GTcpConnection* getTcpConnectionStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
setGracefulDisconnect
void setGracefulDisconnect(int gracefulDisconnect)

This enabled graceful disconnects on close. A graceful disconnect means that we signal the recieving end that the connection is terminated and wait for it to close the connection before closing the connection. A graceful disconnect means that we can be sure that we successfully sent all the outstanding data to the other end, or get an error reported. However, it also means we have to wait for all the data to reach the other side and for it to acknowledge this by closing the socket, which may take a while. For this reason it is disabled by default. Since 2.22

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

gTcpConnection
GTcpConnection* gTcpConnection;

the main Gtk struct

Inherited Members

From SocketConnection

gSocketConnection
GSocketConnection* gSocketConnection;

the main Gtk struct

getSocketConnectionStruct
GSocketConnection* getSocketConnectionStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getLocalAddress
SocketAddress getLocalAddress()

Try to get the local address of a socket connection. Since 2.22

getRemoteAddress
SocketAddress getRemoteAddress()

Try to get the remote address of a socket connection. Since 2.22

getSocket
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. Since 2.22

factoryCreateConnection
SocketConnection factoryCreateConnection(Socket socket)

Creates a GSocketConnection subclass of the right type for socket. Since 2.22

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. If no type is registered, the GSocketConnection base type is returned. Since 2.22

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. If no type is registered, the GSocketConnection base type is returned. Since 2.22

Meta