Structure SilcClientConnection
NAME
typedef struct SilcClientConnectionStruct { ... }
*SilcClientConnection
DESCRIPTION
This structure represents a connection. When connection is created
to server this is context is returned to the application in the
"connected" client operation. It includes all the important
data for the session, such as nickname, local and remote IDs, and
other information. All strings in the structure are UTF-8 encoded.
SOURCE
struct SilcClientConnectionStruct {
/*
* Local data
*/
char *nickname; /* Current nickname */
SilcClientEntry local_entry; /* Own Client Entry */
SilcClientID *local_id; /* Current Client ID */
unsigned char *local_id_data; /* Current Client ID decoded */
SilcUInt32 local_id_data_len;
/*
* Remote data
*/
char *remote_host; /* Remote host name, UTF-8 encoded */
int remote_port; /* Remote port */
SilcServerID *remote_id; /* Remote Server ID */
unsigned char *remote_id_data; /* Remote Server ID decoded */
SilcUInt32 remote_id_data_len;
/*
* Common data
*/
/* Current command identifier for a command that was sent last.
Application may get the value from this variable to find out the
command identifier for last command. */
SilcUInt16 cmd_ident;
/* User data context. Library does not touch this. Application may
freely set and use this pointer for its needs. */
void *context;
/* Pointer back to the SilcClient. Application may use this. */
SilcClient client;
/* Current channel. Application may use and set this pointer if needed. */
SilcChannelEntry current_channel;
/* Socket connection object for this connection. Application may
use this if needed. The sock->user_data is back pointer to this
structure. */
SilcSocketConnection sock;
/* Internal data for client library. Application cannot access this
data at all. */
SilcClientConnectionInternal internal;
};
|