![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
GNetworkTcpConnection — A TCP/IP connection object.
enum GNetworkTcpConnectionStatus; struct GNetworkTcpConnection; struct GNetworkTcpConnectionClass;
"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" GNetworkIpAddress : Read "key-file"gchararray : Read / Write / Construct "local-address" GNetworkIpAddress : Read "local-port"guint : Read "port"guint : Read / Write / Construct "proxy-type" GNetworkTcpProxyType : Read / Write / Construct "socket"gpointer : Read / 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
The "error" signal for
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.
the object callback stub for the "certificate-error" signal. |
"address" ( | 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" ( | The path to a file which contains the X.509 certificates of trusted signers. |
"certificate-file" ( | The path to a file which contains X.509 certificates to distribute to clients. |
"ip-address" (GNetworkIpAddress : Read) | The IP address to connect to. |
"key-file" ( | The path to a file which contains X.509 keys to distribute to clients. |
"local-address" (GNetworkIpAddress : Read) | The IP address of this computer. |
"local-port" ( | The local port number we are connected through. |
"port" ( | The port number to connect to. |
"proxy-type" (GNetworkTcpProxyType : Read / Write / Construct) | The type of proxy to use, depending on the protocol. |
"socket" ( | The socket file descriptor. |
"ssl-enabled" ( | 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 | GNetworkUnixConnection >> |