Couchbase C Client  2.4.4
iops.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /*
3  * Copyright 2014 Couchbase, Inc.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef LIBCOUCHBASE_COUCHBASE_H
19 #error "include libcouchbase/couchbase.h first"
20 #endif
21 
22 #ifndef LCB_IOPS_H
23 #define LCB_IOPS_H
24 
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71 
73 #ifdef _WIN32
74 typedef SOCKET lcb_socket_t;
75 #else
76 typedef int lcb_socket_t;
77 #endif
78 
79 struct sockaddr;
80 
81 #ifndef _WIN32
82 
83 #define LCB_IOV_LAYOUT_UIO
84 typedef struct lcb_iovec_st {
85  void *iov_base;
86  size_t iov_len;
87 } lcb_IOV;
88 #else
89 
90 #define LCB_IOV_LAYOUT_WSABUF
91 typedef struct lcb_iovec_st {
92  ULONG iov_len;
93  void *iov_base;
94 } lcb_IOV;
95 #endif
96 
99  struct {
100  struct sockaddr *name;
101  int *len;
102  } local;
103 
104  struct {
105  struct sockaddr *name;
106  int *len;
107  } remote;
108 };
109 
120 typedef struct lcb_io_opt_st* lcb_io_opt_t;
121 
131 typedef void (*lcb_ioE_callback)
132  (lcb_socket_t sock, short events, void *uarg);
133 
144 typedef void *(*lcb_io_timer_create_fn)
145  (lcb_io_opt_t iops);
146 
155 typedef void (*lcb_io_timer_destroy_fn)
156  (lcb_io_opt_t iops, void *timer);
157 
168 typedef void (*lcb_io_timer_cancel_fn)
169  (lcb_io_opt_t iops, void *timer);
170 
181 typedef int (*lcb_io_timer_schedule_fn)
182  (lcb_io_opt_t iops, void *timer,
183  lcb_U32 usecs,
184  void *uarg,
185  lcb_ioE_callback callback);
186 
202 typedef void *(*lcb_ioE_event_create_fn)
203  (lcb_io_opt_t iops);
204 
212 typedef void (*lcb_ioE_event_destroy_fn)
213  (lcb_io_opt_t iops, void *event);
214 
226 typedef void (*lcb_ioE_event_cancel_fn)
227  (lcb_io_opt_t iops, lcb_socket_t sock, void *event);
228 
229 
231 #define LCB_READ_EVENT 0x02
232 
233 #define LCB_WRITE_EVENT 0x04
234 
235 #define LCB_ERROR_EVENT 0x08
236 #define LCB_RW_EVENT (LCB_READ_EVENT|LCB_WRITE_EVENT)
237 
263 typedef int (*lcb_ioE_event_watch_fn)
264  (lcb_io_opt_t iops,
265  lcb_socket_t socket,
266  void *event,
267  short evflags,
268  void *uarg,
269  lcb_ioE_callback callback);
270 
280 typedef lcb_SSIZE (*lcb_ioE_recv_fn)
281  (lcb_io_opt_t iops, lcb_socket_t sock, void *target_buf,
282  lcb_SIZE buflen, int _unused_flags);
283 
287 typedef lcb_SSIZE (*lcb_ioE_send_fn)
288  (lcb_io_opt_t iops, lcb_socket_t sock, const void *srcbuf,
289  lcb_SIZE buflen, int _ignored);
290 
293 typedef lcb_SSIZE (*lcb_ioE_recvv_fn)
294  (lcb_io_opt_t iops, lcb_socket_t sock, lcb_IOV *iov, lcb_SIZE niov);
295 
298 typedef lcb_SSIZE (*lcb_ioE_sendv_fn)
299  (lcb_io_opt_t iops, lcb_socket_t sock, lcb_IOV *iov, lcb_SIZE niov);
300 
304  (lcb_io_opt_t iops, int domain, int type, int protocol);
305 
308 typedef int (*lcb_ioE_connect_fn)
309  (lcb_io_opt_t iops,
310  lcb_socket_t sock,
311  const struct sockaddr *dst,
312  unsigned int addrlen);
313 
315 typedef int (*lcb_ioE_bind_fn)
316  (lcb_io_opt_t iops,
317  lcb_socket_t sock,
318  const struct sockaddr *srcaddr,
319  unsigned int addrlen);
320 
322 typedef int (*lcb_ioE_listen_fn)
323  (lcb_io_opt_t iops,
324  lcb_socket_t bound_sock,
325  unsigned int queuelen);
326 
328 typedef lcb_socket_t (*lcb_ioE_accept_fn)
329  (lcb_io_opt_t iops,
330  lcb_socket_t lsnsock);
331 
334 typedef void (*lcb_ioE_close_fn)
335  (lcb_io_opt_t iops, lcb_socket_t sock);
336 
337 
348 #define LCB_IO_SOCKCHECK_PEND_IS_ERROR 1
349 
350 #define LCB_IO_SOCKCHECK_STATUS_CLOSED 1
351 #define LCB_IO_SOCKCHECK_STATUS_OK 0
352 #define LCB_IO_SOCKCHECK_STATUS_UNKNOWN -1
353 
369 typedef int (*lcb_ioE_chkclosed_fn)
370  (lcb_io_opt_t iops, lcb_socket_t sock, int flags);
371 
375 struct ringbuffer_st;
376 struct lcb_connection_st;
377 struct lcbio_SOCKET;
378 
380 struct lcb_buf_info {
381  char *root;
382  lcb_SIZE size;
383  struct ringbuffer_st *ringbuffer;
384  struct lcb_iovec_st iov[2];
385 };
386 
393 typedef struct lcb_sockdata_st {
394  lcb_socket_t socket;
395  lcb_io_opt_t parent;
396  struct lcbio_SOCKET *lcbconn;
397  int closed;
399  struct lcb_buf_info read_buffer;
401 
403 typedef struct lcb_io_writebuf_st {
404  struct lcb_io_opt_st *parent;
405  struct lcb_buf_info buffer;
407 
421 typedef lcb_sockdata_t* (*lcb_ioC_socket_fn)
422  (lcb_io_opt_t iops, int domain, int type, int protocol);
423 
430 typedef void (*lcb_io_connect_cb)(lcb_sockdata_t *socket, int status);
431 
441 typedef int (*lcb_ioC_connect_fn)
442  (lcb_io_opt_t iops, lcb_sockdata_t *sd,
443  const struct sockaddr *dst,
444  unsigned int naddr,
445  lcb_io_connect_cb callback);
446 
453 typedef void (lcb_ioC_serve_callback)
454  (lcb_sockdata_t *sd_server,
455  lcb_sockdata_t *sd_client,
456  int status);
457 
466 typedef int (*lcb_ioC_serve_fn)
467  (lcb_io_opt_t iops,
468  lcb_sockdata_t *server_socket,
469  const struct sockaddr *listen_addr,
470  lcb_ioC_serve_callback callback);
471 
478 typedef int (*lcb_ioC_nameinfo_fn)
479  (lcb_io_opt_t iops,
480  lcb_sockdata_t *sock,
481  struct lcb_nameinfo_st *ni);
482 
484 typedef void (*lcb_ioC_read_callback)(lcb_sockdata_t *sd, lcb_SSIZE nread);
485 #define lcb_io_read_cb lcb_ioC_read_callback
486 
489 typedef lcb_io_writebuf_t* (*lcb_ioC_wballoc_fn)(lcb_io_opt_t,lcb_sockdata_t *);
491 typedef void (*lcb_ioC_wbfree_fn)(lcb_io_opt_t,lcb_sockdata_t*,lcb_io_writebuf_t*);
493 typedef void (*lcb_ioC_write_callback)(lcb_sockdata_t*,lcb_io_writebuf_t*,int);
494 #define lcb_io_write_cb lcb_ioC_write_callback
495 
497 typedef int (*lcb_ioC_write_fn)
498  (lcb_io_opt_t,lcb_sockdata_t*,lcb_io_writebuf_t*,lcb_ioC_write_callback);
499 
500 
507 typedef void (*lcb_ioC_write2_callback)
508  (lcb_sockdata_t *sd,
509  int status,
510  void *arg);
511 
529 typedef int (*lcb_ioC_write2_fn)
530  (lcb_io_opt_t iops,
531  lcb_sockdata_t *sd,
532  lcb_IOV *iov,
533  lcb_SIZE niov,
534  void *uarg,
535  lcb_ioC_write2_callback callback);
536 
537 
544 typedef void (*lcb_ioC_read2_callback)
545  (lcb_sockdata_t *sd, lcb_SSIZE nread, void *arg);
561 typedef int (*lcb_ioC_read2_fn)
562  (lcb_io_opt_t iops,
563  lcb_sockdata_t *sd,
564  lcb_IOV *iov,
565  lcb_SIZE niov,
566  void *uarg,
567  lcb_ioC_read2_callback callback);
568 
583 typedef unsigned int (*lcb_ioC_close_fn)
584  (lcb_io_opt_t iops,
585  lcb_sockdata_t *sd);
586 
596 typedef int (*lcb_ioC_chkclosed_fn)
597  (lcb_io_opt_t iops, lcb_sockdata_t *sd, int flags);
598 
609 typedef void (*lcb_io_start_fn)(lcb_io_opt_t iops);
610 
618 typedef void (*lcb_io_stop_fn)(lcb_io_opt_t iops);
619 
620 LCB_DEPRECATED(typedef void (*lcb_io_error_cb)(lcb_sockdata_t *socket));
621 
622 #define LCB_IOPS_BASE_FIELDS \
623  void *cookie; \
624  int error; \
625  int need_cleanup;
626 
629  LCB_IOPS_BASE_FIELDS
646  lcb_ioE_event_cancel_fn delete_event;
647 
650 };
651 
689  LCB_IOPS_BASE_FIELDS
690 
691  lcb_ioC_socket_fn create_socket;
692  lcb_ioC_connect_fn start_connect;
693  lcb_ioC_wballoc_fn create_writebuf;
694  lcb_ioC_wbfree_fn release_writebuf;
695  lcb_ioC_write_fn start_write;
696  lcb_ioC_read_fn start_read;
697  lcb_ioC_close_fn close_socket;
698 
699  lcb_io_timer_create_fn create_timer;
700  lcb_io_timer_destroy_fn destroy_timer;
701  lcb_io_timer_cancel_fn delete_timer;
702  lcb_io_timer_schedule_fn update_timer;
703 
704  lcb_ioC_nameinfo_fn get_nameinfo;
705 
706  void (*pad1)(void);
707  void (*pad2)(void);
708 
710  void (*send_error)(struct lcb_io_opt_st*, lcb_sockdata_t*,void(*)(lcb_sockdata_t*));
711 
712  lcb_io_stop_fn stop_event_loop;
713  lcb_io_start_fn run_event_loop;
714 };
715 
717 typedef struct lcb_timerprocs_st {
718  lcb_io_timer_create_fn create;
719  lcb_io_timer_destroy_fn destroy;
720  lcb_io_timer_cancel_fn cancel;
721  lcb_io_timer_schedule_fn schedule;
723 
725 typedef struct lcb_loopprocs_st {
726  lcb_io_start_fn start;
727  lcb_io_stop_fn stop;
729 
731 typedef struct lcb_bsdprocs_st {
732  lcb_ioE_socket_fn socket0;
733  lcb_ioE_connect_fn connect0;
734  lcb_ioE_recv_fn recv;
735  lcb_ioE_recvv_fn recvv;
736  lcb_ioE_send_fn send;
737  lcb_ioE_sendv_fn sendv;
738  lcb_ioE_close_fn close;
739  lcb_ioE_bind_fn bind;
740  lcb_ioE_listen_fn listen;
741  lcb_ioE_accept_fn accept;
742  lcb_ioE_chkclosed_fn is_closed;
743 } lcb_bsd_procs;
744 
746 typedef struct lcb_evprocs_st {
748  lcb_ioE_event_destroy_fn destroy;
751 } lcb_ev_procs;
752 
754 typedef struct {
755  lcb_ioC_socket_fn socket;
756  lcb_ioC_close_fn close;
757  lcb_ioC_read_fn read;
758  lcb_ioC_connect_fn connect;
759  lcb_ioC_wballoc_fn wballoc;
760  lcb_ioC_wbfree_fn wbfree;
761  lcb_ioC_write_fn write;
762  lcb_ioC_write2_fn write2;
763  lcb_ioC_read2_fn read2;
764  lcb_ioC_serve_fn serve;
765  lcb_ioC_nameinfo_fn nameinfo;
766  lcb_ioC_chkclosed_fn is_closed;
768 
772 typedef enum {
775 } lcb_iomodel_t;
776 
860 typedef void (*lcb_io_procs_fn)
861  (int version,
862  lcb_loop_procs *loop_procs,
863  lcb_timer_procs *timer_procs,
864  lcb_bsd_procs *bsd_procs,
865  lcb_ev_procs *ev_procs,
866  lcb_completion_procs *completion_procs,
867  lcb_iomodel_t *iomodel);
868 
869 struct lcbio_TABLE;
870 struct lcb_iops2_st {
871  LCB_IOPS_BASE_FIELDS
872  lcb_io_procs_fn get_procs;
873  struct lcbio_TABLE *iot;
874 };
875 
881 #define LCB_IOPROCS_VERSION 3
882 
883 struct lcb_io_opt_st {
884  int version;
885  void *dlhandle;
886  void (*destructor)(struct lcb_io_opt_st *iops);
887  union {
888  struct {
889  LCB_IOPS_BASE_FIELDS
890  } base;
891 
893  struct lcb_iops_evented_st v0;
894  struct lcb_iops_completion_st v1;
895  struct lcb_iops2_st v2;
896  } v;
897 };
898 
907 typedef lcb_error_t (*lcb_io_create_fn)
908  (int version, lcb_io_opt_t *io, void *cookie);
909 
910 
911 #ifdef __cplusplus
912 }
913 #endif
914 
917 #endif
int(* lcb_ioC_chkclosed_fn)(lcb_io_opt_t iops, lcb_sockdata_t *sd, int flags)
This is the completion variant of lcb_ioE_chkclosed_fn.
Definition: iops.h:597
lcb_error_t(* lcb_io_create_fn)(int version, lcb_io_opt_t *io, void *cookie)
Signature for a loadable plugin's IOPS initializer.
Definition: iops.h:908
lcb_io_stop_fn stop_event_loop
Start the event loop.
Definition: iops.h:648
lcb_ioE_event_watch_fn update_event
Watch a socket for events.
Definition: iops.h:645
IOPS optimized for IOCP-style IO.
Definition: iops.h:688
lcb_ioE_event_create_fn create_event
Create a socket event handle.
Definition: iops.h:643
struct lcbio_SOCKET * lcbconn
Internal socket equivalent.
Definition: iops.h:396
void(* lcb_io_procs_fn)(int version, lcb_loop_procs *loop_procs, lcb_timer_procs *timer_procs, lcb_bsd_procs *bsd_procs, lcb_ev_procs *ev_procs, lcb_completion_procs *completion_procs, lcb_iomodel_t *iomodel)
Definition: iops.h:861
void(* lcb_io_timer_cancel_fn)(lcb_io_opt_t iops, void *timer)
Cancel a pending timer callback.
Definition: iops.h:169
void( lcb_ioC_serve_callback)(lcb_sockdata_t *sd_server, lcb_sockdata_t *sd_client, int status)
Callback invoked when a new client connection has been established.
Definition: iops.h:454
lcb_ioE_send_fn send
Send data from a single buffer.
Definition: iops.h:633
void(* lcb_ioE_event_cancel_fn)(lcb_io_opt_t iops, lcb_socket_t sock, void *event)
Cancel pending callbacks and unwatch a handle.
Definition: iops.h:227
lcb_socket_t(* lcb_ioE_socket_fn)(lcb_io_opt_t iops, int domain, int type, int protocol)
Create a new socket.
Definition: iops.h:304
int(* lcb_io_timer_schedule_fn)(lcb_io_opt_t iops, void *timer, lcb_U32 usecs, void *uarg, lcb_ioE_callback callback)
Schedule a callback to be invoked within a given interval.
Definition: iops.h:182
Socket handle for completion-based I/O.
Definition: iops.h:393
Definition: iops.h:380
structure indicating a buffer and its size
Definition: iops.h:84
IOPS For poll-style notification.
Definition: iops.h:628
structure describing a connected socket's endpoints
Definition: iops.h:98
void(* lcb_ioE_close_fn)(lcb_io_opt_t iops, lcb_socket_t sock)
Close a socket.
Definition: iops.h:335
void(* lcb_io_timer_destroy_fn)(lcb_io_opt_t iops, void *timer)
Destroy a timer handler.
Definition: iops.h:156
void(* lcb_ioC_write_callback)(lcb_sockdata_t *, lcb_io_writebuf_t *, int)
Definition: iops.h:493
lcb_io_start_fn run_event_loop
Stop the event loop.
Definition: iops.h:649
int(* lcb_ioC_write2_fn)(lcb_io_opt_t iops, lcb_sockdata_t *sd, lcb_IOV *iov, lcb_SIZE niov, void *uarg, lcb_ioC_write2_callback callback)
Schedule a flush of a series of buffers to the network.
Definition: iops.h:530
void *(* lcb_ioE_event_create_fn)(lcb_io_opt_t iops)
Create a new event handle.
Definition: iops.h:203
lcb_io_timer_create_fn create_timer
Create a new timer handle.
Definition: iops.h:638
void(* lcb_io_stop_fn)(lcb_io_opt_t iops)
Pause the event loop.
Definition: iops.h:618
int(* lcb_ioC_read_fn)(lcb_io_opt_t, lcb_sockdata_t *, lcb_ioC_read_callback)
Definition: iops.h:487
void(* lcb_io_start_fn)(lcb_io_opt_t iops)
Start the event loop.
Definition: iops.h:609
lcb_ioE_recv_fn recv
Receive data into a single buffer.
Definition: iops.h:632
void *(* lcb_io_timer_create_fn)(lcb_io_opt_t iops)
Create a new timer object.
Definition: iops.h:145
lcb_io_writebuf_t *(* lcb_ioC_wballoc_fn)(lcb_io_opt_t, lcb_sockdata_t *)
Definition: iops.h:489
lcb_SSIZE(* lcb_ioE_sendv_fn)(lcb_io_opt_t iops, lcb_socket_t sock, lcb_IOV *iov, lcb_SIZE niov)
Write data from multiple buffers.
Definition: iops.h:299
int(* lcb_ioC_serve_fn)(lcb_io_opt_t iops, lcb_sockdata_t *server_socket, const struct sockaddr *listen_addr, lcb_ioC_serve_callback callback)
Specify that the socket start accepting connections.
Definition: iops.h:467
lcb_io_opt_t parent
Parent I/O context.
Definition: iops.h:395
int(* lcb_ioE_event_watch_fn)(lcb_io_opt_t iops, lcb_socket_t socket, void *event, short evflags, void *uarg, lcb_ioE_callback callback)
Associate an event with a socket, requesting notification when one of the events specified in 'flags'...
Definition: iops.h:264
LCB_IOPS_BASE_FIELDS lcb_ioE_socket_fn socket
Create a socket.
Definition: iops.h:630
Definition: iops.h:403
void(* lcb_ioE_callback)(lcb_socket_t sock, short events, void *uarg)
Callback invoked for all poll-like events.
Definition: iops.h:132
Common functions for starting and stopping the event loop.
Definition: iops.h:725
unsigned int(* lcb_ioC_close_fn)(lcb_io_opt_t iops, lcb_sockdata_t *sd)
Asynchronously shutdown the socket.
Definition: iops.h:584
lcb_io_timer_schedule_fn update_timer
Schedule a timer.
Definition: iops.h:641
int(* lcb_ioC_write_fn)(lcb_io_opt_t, lcb_sockdata_t *, lcb_io_writebuf_t *, lcb_ioC_write_callback)
Definition: iops.h:498
int(* lcb_ioC_nameinfo_fn)(lcb_io_opt_t iops, lcb_sockdata_t *sock, struct lcb_nameinfo_st *ni)
Request address information on a connected socket.
Definition: iops.h:479
void(* lcb_ioC_read2_callback)(lcb_sockdata_t *sd, lcb_SSIZE nread, void *arg)
Callback invoked when a read has been completed.
Definition: iops.h:545
lcb_sockdata_t *(* lcb_ioC_socket_fn)(lcb_io_opt_t iops, int domain, int type, int protocol)
Create a completion socket handle.
Definition: iops.h:422
int is_reading
Internally used by lcbio.
Definition: iops.h:398
lcb_SSIZE(* lcb_ioE_recvv_fn)(lcb_io_opt_t iops, lcb_socket_t sock, lcb_IOV *iov, lcb_SIZE niov)
Read data into a series of buffers.
Definition: iops.h:294
void(* lcb_ioC_write2_callback)(lcb_sockdata_t *sd, int status, void *arg)
Callback received when a buffer has been flushed.
Definition: iops.h:508
lcb_ioE_close_fn close
Close a socket.
Definition: iops.h:636
Common functions for starting and stopping timers.
Definition: iops.h:717
int(* lcb_ioC_connect_fn)(lcb_io_opt_t iops, lcb_sockdata_t *sd, const struct sockaddr *dst, unsigned int naddr, lcb_io_connect_cb callback)
Request a connection for a socket.
Definition: iops.h:442
void(* lcb_io_connect_cb)(lcb_sockdata_t *socket, int status)
Callback to be invoked upon a connection result.
Definition: iops.h:430
lcb_io_timer_cancel_fn delete_timer
Cancel a pending timer.
Definition: iops.h:640
int(* lcb_ioC_read2_fn)(lcb_io_opt_t iops, lcb_sockdata_t *sd, lcb_IOV *iov, lcb_SIZE niov, void *uarg, lcb_ioC_read2_callback callback)
Schedule a read from the network.
Definition: iops.h:562
int closed
Definition: iops.h:397
lcb_SSIZE(* lcb_ioE_send_fn)(lcb_io_opt_t iops, lcb_socket_t sock, const void *srcbuf, lcb_SIZE buflen, int _ignored)
Send data from a single buffer.
Definition: iops.h:288
void(* lcb_ioC_read_callback)(lcb_sockdata_t *sd, lcb_SSIZE nread)
Definition: iops.h:484
lcb_ioE_recvv_fn recvv
Receive data into multiple buffers.
Definition: iops.h:634
Functions handling socket watcher events.
Definition: iops.h:746
lcb_socket_t socket
System socket, for informational purposes.
Definition: iops.h:394
lcb_iomodel_t
Enumeration defining the I/O model.
Definition: iops.h:772
lcb_error_t
Error codes returned by the library.
Definition: error.h:425
int(* lcb_ioE_connect_fn)(lcb_io_opt_t iops, lcb_socket_t sock, const struct sockaddr *dst, unsigned int addrlen)
Connect a created socket.
Definition: iops.h:309
lcb_SSIZE(* lcb_ioE_recv_fn)(lcb_io_opt_t iops, lcb_socket_t sock, void *target_buf, lcb_SIZE buflen, int _unused_flags)
Receive data into a single buffer.
Definition: iops.h:281
lcb_ioE_event_destroy_fn destroy_event
Destroy a socket event handle.
Definition: iops.h:644
void(* lcb_ioE_event_destroy_fn)(lcb_io_opt_t iops, void *event)
Destroy an event handle.
Definition: iops.h:213
lcb_io_timer_destroy_fn destroy_timer
Destroy a timer handle.
Definition: iops.h:639
IOCP/Completion style.
Definition: iops.h:774
int lcb_socket_t
Type representing the native socket type of the operating system.
Definition: iops.h:76
lcb_ioE_sendv_fn sendv
Send data from multiple buffers.
Definition: iops.h:635
void(* send_error)(struct lcb_io_opt_st *, lcb_sockdata_t *, void(*)(lcb_sockdata_t *))
Definition: iops.h:710
lcb_ioE_connect_fn connect
Connect a socket.
Definition: iops.h:631
Functions for completion-based I/O.
Definition: iops.h:754
void(* lcb_ioC_wbfree_fn)(lcb_io_opt_t, lcb_sockdata_t *, lcb_io_writebuf_t *)
Definition: iops.h:491
int(* lcb_ioE_chkclosed_fn)(lcb_io_opt_t iops, lcb_socket_t sock, int flags)
Check if a socket has been closed or not.
Definition: iops.h:370
Functions wrapping the Berkeley Socket API.
Definition: iops.h:731
Event/Poll style.
Definition: iops.h:773