libuv/ol-unix.h
2011-03-29 16:42:13 -07:00

51 lines
634 B
C

#ifndef OL_UNIX_H
#define OL_UNIX_H
#include "ngx-queue.h"
#include "ev/ev.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
/**
* Note can be cast to io_vec.
*/
typedef struct {
char* base;
size_t len;
} ol_buf;
typedef struct {
int local;
ol_req_cb connect_cb;
ngx_queue_t read_reqs;
} ol_req_private;
typedef struct {
int fd;
ol_err err;
ol_read_cb read_cb;
ol_close_cb close_cb;
ol_req *connect_req;
ev_io read_watcher;
ev_io write_watcher;
ngx_queue_t write_queue;
ngx_queue_t read_reqs;
} ol_handle_private;
#endif /* OL_UNIX_H */