Structure SilcClientConnection
NAME
typedef struct SilcClientConnectionStruct { ... }
*SilcClientConnection
DESCRIPTION
This structure represents a connection. It is allocated and freed by
the library. It is returned to application in SilcClientConnectCallback.
It includes all the important data for the session such as local
client entry (which includes current nickname), local and remote IDs,
and other information. All strings in the structure are UTF-8 encoded.
SOURCE
struct SilcClientConnectionStruct {
SilcClientEntry local_entry; /* Our own Client Entry */
SilcClientID *local_id; /* Our current Client ID */
char *remote_host; /* Remote host name */
int remote_port; /* Remote port */
SilcID remote_id; /* Remote ID */
SilcChannelEntry current_channel; /* Current joined channel */
SilcPublicKey public_key; /* Public key used in this connection */
SilcPrivateKey private_key; /* Private key */
SilcPacketStream stream; /* Connection to remote host */
SilcConnectionType type; /* Connection type */
SilcClientConnectCallback callback; /* Connection callback */
void *callback_context; /* Connection context */
SilcClient client; /* Pointer back to SilcClient */
/* Current say() or verify_public_key() operation associated context,
identifies the client, channel or server the operation is related to.
Application can use this information to target the operation better. */
union {
SilcClientEntry client_entry;
SilcChannelEntry channel_entry;
SilcServerEntry server_entry;
};
SilcIdType context_type; /* Defines which pointer is set
in the union. If SILC_ID_NONE
pointer is NULL. */
/* Application specific data. Application may set here whatever it wants. */
void *context;
/* Internal data for client library. Application cannot access this. */
SilcClientConnectionInternal internal;
};
|