A LOT updates. Cannot separate. :)
[silc.git] / lib / silcclient / README
index 60af009cde2ab00e590b27540b4abb6f8f4d350a..cdd1011cf1aec58e555ee30bc1e64c479a2f31ff 100644 (file)
@@ -65,6 +65,7 @@ some other tasks that must be done before initializing the client.  Following
 pointers must be set before calling the initializing function:
 
        client->username
+       client->hostname
        client->realname
        client->pkcs
        client->public_key
@@ -113,3 +114,28 @@ Application specific context can be saved to the SilcClientConnection object
 which then can be retrieved in the application, thus perhaps associate
 the connection with what ever object in the application (window or something
 else).
+
+
+Using Own Connecting
+====================
+
+Application might not want to use silc_client_connect_to_server function
+if it wants to perform its own connecting for some reason.  In this case
+application must call function silc_client_start_key_exchange after it
+has created the connection by itself.  This function starts key exhange
+protocol between the client and server and the library takes care of
+everything after that.
+
+After connection has been created application must call:
+
+       SilcClientConnection conn;
+
+       /* Add new connection to client */
+       conn = silc_client_add_connection(client, hostname, port, context);
+
+       /* Start key exchange and let the library handle everything
+          after this point on. */
+       silc_client_start_key_exchange(client, conn, sock);
+
+These calls are performed only and only if application did not call
+silc_client_connect_to_server function.