Poll for new events once. Note that this function blocks if there are no pending events. Returns zero when done (no active handles or requests left), or non-zero if more events are expected (meaning you should call uv_run_once() again sometime in the future).

Shutdown the outgoing (write) side of a duplex stream. It waits for pending write requests to complete. The handle should refer to a initialized stream. req should be an uninitialized shutdown request struct. The cb is called after shutdown is complete.

This call is used in conjunction with `UV::listen` to accept incoming connections. Call `UV::accept` after receiving a $connection_cb to accept the connection. Before calling UV::accept use UV::*_init() must be called on the client. Non-zero return value indicates an error.

When the $connection_cb is called it is guaranteed that UV::accept will complete successfully the first time. If you attempt to use it more than once, it may fail. It is suggested to only call uv_accept once per uv_connection_cb call.

Read data from an incoming stream. The callback will be made several several times until there is no more data to read or uv_read_stop is called. When we've reached EOF nread will be set to -1 and the error is set to UV_EOF. When nread == -1 the buf parameter might not point to a valid buffer; in that case buf.len and buf.base are both set to 0. Note that nread might also be 0, which does *not* indicate an error or eof; it happens when libuv requested a buffer through the alloc callback but then decided that it didn't need that buffer.

Extended write function for sending handles over a pipe. The pipe must be initialized with ipc == 1. send_handle must be a TCP socket or pipe, which is a server or a connection (listening or connected state). Bound sockets or pipes will be assumed to be servers.

This setting applies to Windows only. Enable/disable simultaneous asynchronous accept requests that are queued by the operating system when listening for new tcp connections. This setting is used to tune a tcp server for the desired performance. Having simultaneous accepts can significantly improve the rate of accepting connections (which is why it is enabled by default).

uv_tcp_connect, uv_tcp_connect6 These functions establish IPv4 and IPv6 TCP connections. Provide an initialized TCP handle and an uninitialized uv_connect_t*. The callback will be made when the connection is established.

Arguments: handle UDP handle. Should have been initialized with `uv_udp_init`. multicast_addr multicast address to set membership for interface_addr interface address membership Should be UV_JOIN_GROUP or UV_LEAVE_GROUP

Initialize a new TTY stream with the given file descriptor. Usually the file descriptor will be 0 = stdin 1 = stdout 2 = stderr The last argument, readable, specifies if you plan on calling uv_read_start with this stream. stdin is readable, stdout is not.

Starts polling the file descriptor. `events` is a bitmask consisting made up of UV_READABLE and UV_WRITABLE. As soon as an event is detected the callback will be called with `status` set to 0, and the detected events set en the `events` field.

If an error happens while polling status may be set to -1 and the error code can be retrieved with uv_last_error. The user should not close the socket while uv_poll is active. If the user does that anyway, the callback *may* be called reporting an error status, but this is not guaranteed.

Calling uv_poll_start on an uv_poll watcher that is already active is fine. Doing so will update the events mask that is being watched for.

Used to detect what type of stream should be used with a given file descriptor. Usually this will be used during initialization to guess the type of the stdio streams. For isatty() functionality use this function and test for UV_TTY.

libev wrapper. Every active idle handle gets its callback called repeatedly until it is stopped. This happens after all other types of callbacks are processed. When there are multiple "idle" handles active, their callbacks are called in turn.

libev wrapper. uv_async_send wakes up the event loop and calls the async handle's callback There is no guarantee that every uv_async_send call leads to exactly one invocation of the callback; The only guarantee is that the callback function is called at least once after the call to async_send. Unlike all other libuv functions, uv_async_send can be called from another thread.

Set the repeat value in milliseconds. Note that if the repeat value is set from a timer callback it does not immediately take effect. If the timer was non-repeating before, it will have been stopped. If it was repeating, then the old repeat value will have been used to schedule the next timeout.