Added socket stream and socket into SilcClientConnection context.
[silc.git] / lib / silcclient / silcclient.h
index 898204a18f46663a571c0c38202d924fb9d3f089..23f1aabcc863ab3988a3049d9f8942f17e2a902b 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 - 2007 Pekka Riikonen
+  Copyright (C) 2000 - 2008 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -227,6 +227,8 @@ struct SilcClientConnectionStruct {
   SilcPublicKey public_key;           /* Public key used in this connection */
   SilcPrivateKey private_key;         /* Private key */
   SilcPacketStream stream;            /* Connection to remote host */
+  SilcStream socket_stream;           /* Socket stream from 'stream' */
+  SilcSocket sock;                    /* The socket from 'socket_stream' */
   SilcConnectionType type;            /* Connection type */
   SilcClientConnectCallback callback;  /* Connection callback */
   void *callback_context;             /* Connection context */
@@ -701,9 +703,9 @@ typedef struct SilcClientParamsStruct {
      not all SILC server versions return such channel name strings. */
   SilcBool full_channel_names;
 
-  /* If this is set to TRUE, the silcclient library will not register and
-     deregister the cipher, pkcs, hash and hmac algorithms. The application
-     itself will need to handle that. */
+  /* If this is set to TRUE, the silcclient library will not initialize
+     or uninitialize the SILC Crypto Toolkit.  The application will have
+     to do that itself by calling silc_crypto_init and silc_crypto_uninit. */
   SilcBool dont_register_crypto_library;
 
 } SilcClientParams;
@@ -1083,11 +1085,11 @@ silc_client_connect_to_client(SilcClient client,
  *                                  stream_create_cb, app);
  *
  *    // Stream callback delivers our new SilcStream context
- *    void stream_create_cb(SilcSocketStreamStatus status, SilcStream stream,
+ *    void stream_create_cb(SilcResult status, SilcStream stream,
  *                          void *context)
  *    {
  *      ...
- *      if (status != SILC_SOCKET_OK)
+ *      if (status != SILC_OK)
  *        error(status);
  *
  *      // Start key exchange
@@ -1391,7 +1393,7 @@ SilcUInt16 silc_client_command_call(SilcClient client,
  *
  *    If FALSE is returned in this function this callback will not be called
  *    again for `command' even if there are more comand replies.  By returning
- *    FALSE the caller my stop the command reply handling when needed.
+ *    FALSE the caller may stop the command reply handling when needed.
  *
  ***/
 typedef SilcBool (*SilcClientCommandReply)(SilcClient client,