• Home
  • Raw
  • Download

Lines Matching refs:handle

33 int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {  in uv_pipe_init()  argument
34 uv__stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE); in uv_pipe_init()
35 handle->shutdown_req = NULL; in uv_pipe_init()
36 handle->connect_req = NULL; in uv_pipe_init()
37 handle->pipe_fname = NULL; in uv_pipe_init()
38 handle->ipc = ipc; in uv_pipe_init()
43 int uv_pipe_bind(uv_pipe_t* handle, const char* name) { in uv_pipe_bind() argument
52 if (uv__stream_fd(handle) >= 0) in uv_pipe_bind()
83 handle->flags |= UV_HANDLE_BOUND; in uv_pipe_bind()
84 handle->pipe_fname = pipe_fname; /* Is a strdup'ed copy. */ in uv_pipe_bind()
85 handle->io_watcher.fd = sockfd; in uv_pipe_bind()
94 int uv__pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) { in uv__pipe_listen() argument
95 if (uv__stream_fd(handle) == -1) in uv__pipe_listen()
98 if (handle->ipc) in uv__pipe_listen()
110 if (listen(uv__stream_fd(handle), backlog)) in uv__pipe_listen()
113 handle->connection_cb = cb; in uv__pipe_listen()
114 handle->io_watcher.cb = uv__server_io; in uv__pipe_listen()
115 uv__io_start(handle->loop, &handle->io_watcher, POLLIN); in uv__pipe_listen()
120 void uv__pipe_close(uv_pipe_t* handle) { in uv__pipe_close() argument
121 if (handle->pipe_fname) { in uv__pipe_close()
128 unlink(handle->pipe_fname); in uv__pipe_close()
129 uv__free((void*)handle->pipe_fname); in uv__pipe_close()
130 handle->pipe_fname = NULL; in uv__pipe_close()
133 uv__stream_close((uv_stream_t*)handle); in uv__pipe_close()
137 int uv_pipe_open(uv_pipe_t* handle, uv_file fd) { in uv_pipe_open() argument
143 if (uv__fd_exists(handle->loop, fd)) in uv_pipe_open()
158 err = uv__stream_try_select((uv_stream_t*) handle, &fd); in uv_pipe_open()
169 return uv__stream_open((uv_stream_t*)handle, fd, flags); in uv_pipe_open()
174 uv_pipe_t* handle, in uv_pipe_connect() argument
182 new_sock = (uv__stream_fd(handle) == -1); in uv_pipe_connect()
188 handle->io_watcher.fd = err; in uv_pipe_connect()
196 r = connect(uv__stream_fd(handle), in uv_pipe_connect()
216 err = uv__stream_open((uv_stream_t*)handle, in uv_pipe_connect()
217 uv__stream_fd(handle), in uv_pipe_connect()
222 uv__io_start(handle->loop, &handle->io_watcher, POLLOUT); in uv_pipe_connect()
225 handle->delayed_error = err; in uv_pipe_connect()
226 handle->connect_req = req; in uv_pipe_connect()
228 uv__req_init(handle->loop, req, UV_CONNECT); in uv_pipe_connect()
229 req->handle = (uv_stream_t*)handle; in uv_pipe_connect()
235 uv__io_feed(handle->loop, &handle->io_watcher); in uv_pipe_connect()
240 static int uv__pipe_getsockpeername(const uv_pipe_t* handle, in uv__pipe_getsockpeername() argument
250 err = uv__getsockpeername((const uv_handle_t*) handle, in uv__pipe_getsockpeername()
284 int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) { in uv_pipe_getsockname() argument
285 return uv__pipe_getsockpeername(handle, getsockname, buffer, size); in uv_pipe_getsockname()
289 int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) { in uv_pipe_getpeername() argument
290 return uv__pipe_getsockpeername(handle, getpeername, buffer, size); in uv_pipe_getpeername()
294 void uv_pipe_pending_instances(uv_pipe_t* handle, int count) { in uv_pipe_pending_instances() argument
298 int uv_pipe_pending_count(uv_pipe_t* handle) { in uv_pipe_pending_count() argument
301 if (!handle->ipc) in uv_pipe_pending_count()
304 if (handle->accepted_fd == -1) in uv_pipe_pending_count()
307 if (handle->queued_fds == NULL) in uv_pipe_pending_count()
310 queued_fds = handle->queued_fds; in uv_pipe_pending_count()
315 uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) { in uv_pipe_pending_type() argument
316 if (!handle->ipc) in uv_pipe_pending_type()
319 if (handle->accepted_fd == -1) in uv_pipe_pending_type()
322 return uv__handle_type(handle->accepted_fd); in uv_pipe_pending_type()
326 int uv_pipe_chmod(uv_pipe_t* handle, int mode) { in uv_pipe_chmod() argument
333 if (handle == NULL || uv__stream_fd(handle) == -1) in uv_pipe_chmod()
343 r = uv_pipe_getsockname(handle, NULL, &name_len); in uv_pipe_chmod()
351 r = uv_pipe_getsockname(handle, name_buffer, &name_len); in uv_pipe_chmod()