]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/fb-socket.h
Redblack: Added search_up
[libucw.git] / ucw / fb-socket.h
index b80086048acd24c835d8d32b14c078d94fcec7d3..87b5c622668dab3c13803f0edf808e812d0597d2 100644 (file)
 #ifndef _UCW_FB_SOCKET_H
 #define _UCW_FB_SOCKET_H
 
 #ifndef _UCW_FB_SOCKET_H
 #define _UCW_FB_SOCKET_H
 
-#include "ucw/fastbuf.h"
+#include <ucw/fastbuf.h>
 
 
-struct fbsock_params {
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define fbsock_create ucw_fbsock_create
+#endif
+
+struct fbsock_params { /** Configuration of socket fastbuf. **/
   int fd;
   int fd;
-  uns bufsize;
-  uns timeout_ms;
-  void (*err)(void *data, uns flags, char *msg);
+  int fd_is_shared;
+  uint bufsize;
+  uint timeout_ms;
+  void (*err)(void *data, uint flags, char *msg);
   void *data;                  // Passed to the err callback
 };
 
   void *data;                  // Passed to the err callback
 };
 
-enum fbsock_err_flags {
+enum fbsock_err_flags {        /** Description of a socket error **/
   FBSOCK_READ = 1,             // Happened during read
   FBSOCK_WRITE = 2,            // Happened during write
   FBSOCK_TIMEOUT = 4,          // The error is a timeout
 };
 
   FBSOCK_READ = 1,             // Happened during read
   FBSOCK_WRITE = 2,            // Happened during write
   FBSOCK_TIMEOUT = 4,          // The error is a timeout
 };
 
+/**
+ * Create a new socket fastbuf.
+ * All information is passed by @par.
+ **/
 struct fastbuf *fbsock_create(struct fbsock_params *par);
 
 #endif
 struct fastbuf *fbsock_create(struct fbsock_params *par);
 
 #endif