updates.
[silc.git] / lib / silcutil / silcsockconn.h
index f2e15e3cd1dd177dd28b8b7d6a7bda590c299bca..a7c23d5a90ea252e7d0fad2fd8c8de5dab0f1f8a 100644 (file)
@@ -179,6 +179,7 @@ struct SilcSocketConnectionStruct {
   void *user_data;
   SilcProtocol protocol;
   uint32 flags;
+  uint8 sock_error;
   int users;
 
   char *hostname;
@@ -313,6 +314,23 @@ int silc_socket_read(SilcSocketConnection sock);
  ***/
 int silc_socket_write(SilcSocketConnection sock);
 
+/****f* silcutil/SilcSocketConnectionAPI/silc_socket_get_error
+ *
+ * SYNOPSIS
+ *
+ *    bool silc_socket_get_error(SilcSocketConnection sock, char *error,
+ *                               uint32 error_len);
+ *
+ * DESCRIPTION
+ *
+ *    Returns human readable error message into the `error' buffer if
+ *    the socket is int error status.  Returns TRUE if error message was
+ *    written into the buffer and FALSE if there is not socket error.
+ *
+ ***/
+bool silc_socket_get_error(SilcSocketConnection sock, char *error,
+                          uint32 error_len);
+
 /****f* silcutil/SilcSocketConnectionAPI/SilcSocketConnectionHBCb
  *
  * SYNOPSIS