![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
GNetworkTcpConnection — The main connection object.
enum GNetworkTcpConnectionStatus; struct GNetworkTcpConnection; struct GNetworkTcpConnectionClass;
GObject +----GNetworkTcpConnection
GNetworkTcpConnection implements GNetworkConnection.
"address" gchararray : Read / Write / Construct "authentication-type" GNetworkSslAuthType : Read / Write / Construct "authority-file" gchararray : Read / Write / Construct "certificate-file" gchararray : Read / Write / Construct "ip-address" gchararray : Read "key-file" gchararray : Read / Write / Construct "local-address" gchararray : Read "local-port" guint : Read "port" guint : Read / Write / Construct "proxy-type" GNetworkTcpProxyType : Read / Write / Construct "socket-fd" gint : Write "ssl-enabled" gboolean : Read / Write / Construct "tcp-status" GNetworkTcpConnectionStatus : Read
"certificate-error" void user_function (GNetworkTcpConnection *gnetworktcpconnection, GNetworkSslCert *arg1, GNetworkSslCertErrorFlags arg2, gpointer user_data);
The GNetworkTcpConnection object and associated functions provide the easiest way to create a TCP/IP networking connection. Simply start the Glib main loop, create a new object, connect to the signals, and open it. Properties of this object and the GNetworkConnection interface can be set via g_object_set().
The "error" signal for GnetworkTcpConnection objects use the following error domains: GNETWORK_CONNECTION_ERROR, GNETWORK_SSL_ERROR, GNETWORK_SSL_CERT_ERROR, G_IO_CHANNEL_ERROR, GNETWORK_TCP_PROXY_ERROR.
typedef enum /* <prefix=GNETWORK_TCP_CONNECTION_STATUS> */ { GNETWORK_TCP_CONNECTION_CLOSING, GNETWORK_TCP_CONNECTION_CLOSED, GNETWORK_TCP_CONNECTION_LOOKUP, GNETWORK_TCP_CONNECTION_OPENING, GNETWORK_TCP_CONNECTION_PROXYING, GNETWORK_TCP_CONNECTION_AUTHENTICATING, GNETWORK_TCP_CONNECTION_OPEN } GNetworkTcpConnectionStatus;
An enumeration of the possible states a GNetworkTcpConnection can be in.
GNETWORK_TCP_CONNECTION_CLOSING | the object is closing. |
GNETWORK_TCP_CONNECTION_CLOSED | the object is closed. |
GNETWORK_TCP_CONNECTION_LOOKUP | the object is waiting for a DNS return. |
GNETWORK_TCP_CONNECTION_OPENING | the object is opening the connection from this computer. |
GNETWORK_TCP_CONNECTION_PROXYING | the object is attempting to access the proxy server. |
GNETWORK_TCP_CONNECTION_AUTHENTICATING | the object is authenticating with the SSL server. |
GNETWORK_TCP_CONNECTION_OPEN | the object is open and ready to receive data. |
struct GNetworkTcpConnectionClass { void (*certificate_error) (GNetworkTcpConnection * connection, GNetworkSslCert * certificate, GNetworkSslCertErrorFlags errors); };
The class structure for GNetworkTcpConnection objects.
void (*certificate_error) (GNetworkTcpConnection * connection, GNetworkSslCert * certificate, GNetworkSslCertErrorFlags errors) | the object callback stub for the "certificate-error" signal. |
"address" (gchararray : Read / Write / Construct) | The hostname or IP address to connect to. |
"authentication-type" (GNetworkSslAuthType : Read / Write / Construct) | What type of SSL authentication should be performed with this connection. |
"authority-file" (gchararray : Read / Write / Construct) | The path to a file which contains the X.509 certificates of trusted signers. |
"certificate-file" (gchararray : Read / Write / Construct) | The path to a file which contains X.509 certificates to distribute to clients. |
"ip-address" (gchararray : Read) | The IP address connected to. |
"key-file" (gchararray : Read / Write / Construct) | The path to a file which contains X.509 keys to distribute to clients. |
"local-address" (gchararray : Read) | The hostname or IP address of this computer. |
"local-port" (guint : Read) | The local port number to connect through. |
"port" (guint : Read / Write / Construct) | The port number to connect to. |
"proxy-type" (GNetworkTcpProxyType : Read / Write / Construct) | The type of proxy to use, depending on the protocol. |
"socket-fd" (gint : Write) | The socket file descriptor. For use by #GNetworkTcpServer. |
"ssl-enabled" (gboolean : Read / Write / Construct) | Whether or not SSL will be used with this connection. |
"tcp-status" (GNetworkTcpConnectionStatus : Read) | The current status of the TCP/IP connection. |
void user_function (GNetworkTcpConnection *gnetworktcpconnection, GNetworkSslCert *arg1, GNetworkSslCertErrorFlags arg2, gpointer user_data);
This signal is emitted when an SSL-enabled connection encounters an error while attempting to verify the certificate in arg1.
gnetworktcpconnection : | the object which received the signal. |
arg1 : | the certificate which has problems. |
arg2 : | a bitmask of the problems with arg1. |
user_data : | user data set when the signal handler was connected. |
<< GNetworkConnection | GNetworkServer >> |