X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffb-socket.h;h=033797a1bb29870a475923145719afd0ea46bc8f;hb=2a97a3c705846855ca3b12f408426314c72d37bd;hp=b80086048acd24c835d8d32b14c078d94fcec7d3;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;p=libucw.git diff --git a/ucw/fb-socket.h b/ucw/fb-socket.h index b8008604..033797a1 100644 --- a/ucw/fb-socket.h +++ b/ucw/fb-socket.h @@ -10,22 +10,27 @@ #ifndef _UCW_FB_SOCKET_H #define _UCW_FB_SOCKET_H -#include "ucw/fastbuf.h" +#include -struct fbsock_params { +struct fbsock_params { /** Configuration of socket fastbuf. **/ int fd; + int fd_is_shared; uns bufsize; uns timeout_ms; void (*err)(void *data, uns flags, char *msg); 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 }; +/** + * Create a new socket fastbuf. + * All information is passed by @par. + **/ struct fastbuf *fbsock_create(struct fbsock_params *par); #endif