updates.
[silc.git] / lib / silccore / silcpacket.h
index 2d5ba45dd5e1b00badfc3cf1204b02afe71f0813..0ac7759b4822e81980adfdf783f212ad2eb9f3a5 100644 (file)
@@ -1,24 +1,24 @@
-/****h* silccore/silcpacket.h
- *
- * NAME
- *
- * silcpacket.h
- *
- * COPYRIGHT
- *
- * Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
- *
- * Copyright (C) 1997 - 2001 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+/*
+
+  silcpacket.h
+  Author: Pekka Riikonen <priikone@silcnet.org>
+  Copyright (C) 1997 - 2001 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
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+*/
+
+/****h* silccore/SilcPacketAPI
  *
  * DESCRIPTION
  *
 #ifndef SILCPACKET_H
 #define SILCPACKET_H
 
-/* Amount of bytes to be read from the socket connection at once. */
-#define SILC_PACKET_READ_SIZE 16384
-
-/* Default byte size of the packet. This can be set larger if this
-   is not enough, we shall see. */
-#define SILC_PACKET_DEFAULT_SIZE 2048
+/* Default byte size of the packet. */
+#define SILC_PACKET_DEFAULT_SIZE SILC_SOCKET_BUF_SIZE
 
 /* Header length without source and destination ID's. */
 #define SILC_PACKET_HEADER_LEN 8 + 2
@@ -500,7 +496,7 @@ void silc_packet_send_prepare(SilcSocketConnection sock,
  *
  * SYNOPSIS
  *
- *    int silc_packet_read(int sock, SilcBuffer dest);
+ *    int silc_packet_read(int fd, SilcSocketConnection sock);
  *
  * DESCRIPTION
  *
@@ -519,7 +515,7 @@ void silc_packet_send_prepare(SilcSocketConnection sock,
  *    all of the data could not be read at once.
  *
  ***/
-int silc_packet_read(int sock, SilcBuffer dest);
+int silc_packet_read(int fd, SilcSocketConnection sock);
 
 /****f* silccore/SilcPacketAPI/silc_packet_receive
  *