Structure SilcSocketConnectionStruct
NAME
struct SilcSocketConnectionStruct { ... };
DESCRIPTION
This object holds information about the connected sockets to the server.
This is quite important object since this is referenced by the server all
the time when figuring out what the connection is supposed to be doing
and to whom we should send a message. This structure is the structure
for the SilcSocketConnection forward declaration.
Following short description of the fields:
int sock
The actual connected socket. This is usually saved when accepting
new connection to the server.
SilcSocketType type
Type of the socket. This identifies the type of the connection. This
is mainly used to identify whether the connection is a client or a
server connection.
void *user_data
This is a pointer to a data that is is saved here at the same
time a new connection object is allocated. Usually this is a
back-pointer to some important data for fast referencing. For
SILC server this is a pointer to the ID list and for SILC client
to object holding active connections (windows).
SilcProtocol protocol
Protocol object for the socket. Currently only one protocol can be
executing at a time for a particular socket.
SilcUInt32 flags
Socket flags that indicate the status of the socket. This can
indicate several different status that can affect the use of the
socket object.
int users
Reference counter. When allocated it is set to one (1) and it won't
be freed until it hits zero (0).
SilcSocketConnectionHB hb
The heartbeat context. If NULL, heartbeat is not performed.
SilcBuffer inbuf
SilcBuffer outbuf
Incoming and outgoing buffers for the particular socket connection.
Incoming data from the socket is put after decryption in to the
inbuf buffer and outgoing data after encryption is put to the outbuf
buffer.
char *hostname
char *ip
SilcUInt16 port
Resolved hostname, IP address and port of the connection who owns
this object.
|