updates.
[silc.git] / lib / silcclient / README
index 60af009cde2ab00e590b27540b4abb6f8f4d350a..85748c280e6cd16a68da9692b2cdcbb65eb982f9 100644 (file)
@@ -5,20 +5,19 @@ This directory includes the SILC Client implementation.  The library uses
 common and core components of SILC protocol from lib/silccore library and
 normal utility routines from lib/silcutil library.  The library has been
 designed to be complete SILC Client implementation without actual user
-interface.  The library provides API for the application which can use
-it to implement generally what ever user interface it wants.
+interface.  The library provides the API for the application which it can
+use to implement generally whatever user interface it wants.
 
-The `ops.h' file defines the function prototypes that application must
+The `silcapi.h' file defines the function prototypes that application must
 implement in order to be able to create the user interface with the
-library.  The idea is that the application can implement what ever user
-interface routines in the functions and display the data what ever way
+library.  The idea is that the application can implement whatever user
+interface routines in the functions and display the data whatever way
 it wants.  The library is entirely transparent to the user interface and
 it does not include any user interface specific issues such as window
 handling or item handling on the screen etc.  These does not interest
 the library.
 
 
-
 Creating Client
 ===============
 
@@ -54,6 +53,7 @@ SilcClientOperations ops = {
   get_auth_method:      silc_get_auth_method,
   verify_server_key:    silc_verify_server_key,
   ask_passphrase:       silc_ask_passphrase,
+  failure:              silc_failure,
 };
 
 
@@ -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 the 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.