SILC Core Library SILC Auth API SILC Channel API SILC Command API SILC ID API SILC ID Cache API SILC Modes SILC Notify API SILC Packet API SILC Payload API SILC Private API SILC Math Library SILC Math API SILC MP API SILC SFTP Library SILC SFTP API SILC SFTP Filesystems SILC Utility Library SILC Buffer API SILC Buffer Format API SILC Buffer Utility API SILC Hash Table API SILC Log and Debug API SILC Memory API SILC Mutex API SILC Thread API SILC Net API SILC Schedule API SILC Socket Connection API SILC Protocol API SILC Util API SILC Zip API SILC List API SILC Dynamic List API SILC Key Exchange Library SILC SKE API SILC SKE Status SILC Client Library SILC Client API SILC Crypto Library SILC Cipher API SILC Hash API SILC HMAC API SILC PKCS API SILC RNG API
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.

        uint32 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).

        char *hostname
        char *ip
        uint16 port

          Resolved hostname, IP address and port of the connection who owns
          this object.

        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.

        SilcSocketConnectionHB hb

          The heartbeat context.  If NULL, heartbeat is not performed.
>> SilcSocketConnectionAPI >> SilcSocketConnection >> SilcSocketConnectionHB >> SilcSocketType >> SilcSocketConnectionStruct >> silc_socket_alloc >> silc_socket_free >> silc_socket_dup >> silc_socket_read >> silc_socket_write >> SilcSocketConnectionHBCb >> silc_socket_set_heartbeat >> SilcSocketHostLookupCb >> silc_socket_host_lookup