updates.
[silc.git] / lib / silcutil / win32 / silcwin32sockconn.c
index 7f604c0c6c8b19cf73bfc08668ff8f77a2e4e3a7..c63a77eabd8a80ff0f0bf7f83f07213be576225e 100644 (file)
@@ -47,6 +47,7 @@ int silc_socket_write(SilcSocketConnection sock)
        return -2;
       }
       SILC_LOG_ERROR(("Cannot write to socket: %d", (int)fd));
+      sock->sock_error = err;
       return -1;
     }
 
@@ -94,6 +95,7 @@ int silc_socket_read(SilcSocketConnection sock)
       return -2;
     }
     SILC_LOG_ERROR(("Cannot read from socket: %d", (int)fd));
+    sock->sock_error = err;
     return -1;
   }
 
@@ -116,3 +118,12 @@ int silc_socket_read(SilcSocketConnection sock)
 
   return len;
 }
+
+/* Returns human readable socket error message */
+
+bool silc_socket_get_error(SilcSocketConnection sock, char *error,
+                          uint32 error_len)
+{
+  /* XXX TODO */
+  return FALSE;
+}