#define UV_CONNECT_PRIVATE_FIELDS \
ngx_queue_t queue;
+#define UV_PRIVATE_REQ_TYPES /* empty */
+
/* TODO: union or classes please! */
#define UV_HANDLE_PRIVATE_FIELDS \
ev_io write_watcher; \
ngx_queue_t write_queue; \
ngx_queue_t write_completed_queue;
-
-
+
+
/* UV_NAMED_PIPE */
#define UV_PIPE_PRIVATE_TYPEDEF
#define UV_PIPE_PRIVATE_FIELDS
#define UV_SHUTDOWN_PRIVATE_FIELDS \
/* empty */
+#define UV_PRIVATE_REQ_TYPES \
+ typedef struct uv_pipe_accept_s { \
+ UV_REQ_FIELDS \
+ HANDLE pipeHandle; \
+ struct uv_pipe_accept_s* next_pending; \
+ } uv_pipe_accept_t;
+
#define uv_stream_connection_fields \
unsigned int write_reqs_pending; \
uv_shutdown_t* shutdown_req;
#define uv_pipe_server_fields \
char* name; \
- struct uv_pipe_accept_s { \
- UV_REQ_FIELDS \
- HANDLE pipeHandle; \
- struct uv_pipe_accept_s* next_pending; \
- } accept_reqs[4]; \
- struct uv_pipe_accept_s* pending_accepts;
+ uv_pipe_accept_t accept_reqs[4]; \
+ uv_pipe_accept_t* pending_accepts;
#define uv_pipe_connection_fields \
HANDLE handle;
};
+/* Platform-specific request types */
+UV_PRIVATE_REQ_TYPES
+
+
/*
* Shutdown the outgoing (write) side of a duplex stream. It waits for
* pending write requests to complete. The handle should refer to a
}
-static void uv_pipe_queue_accept(uv_pipe_t* handle, struct uv_pipe_accept_s* req) {
+static void uv_pipe_queue_accept(uv_pipe_t* handle, uv_pipe_accept_t* req) {
HANDLE pipeHandle;
assert(handle->flags & UV_HANDLE_LISTENING);
static int uv_pipe_accept(uv_pipe_t* server, uv_pipe_t* client) {
/* Find a connection instance that has been connected, but not yet accepted. */
- struct uv_pipe_accept_s* req = server->pending_accepts;
+ uv_pipe_accept_t* req = server->pending_accepts;
if (!req) {
/* No valid connections found, so we error out. */
static void uv_process_pipe_accept_req(uv_pipe_t* handle, uv_req_t* raw_req) {
- struct uv_pipe_accept_s* req = (struct uv_pipe_accept_s*) raw_req;
+ uv_pipe_accept_t* req = (uv_pipe_accept_t*) raw_req;
assert(handle->type == UV_NAMED_PIPE);
/* TODO: make this work with UTF8 name */
int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
int i;
- struct uv_pipe_accept_s* req;
+ uv_pipe_accept_t* req;
if (!name) {
uv_set_sys_error(WSAEINVAL);