Returns `true` if the handle is closing or closed, `false`
otherwise.
Returns: `boolean` or `fail`
Note: This function should only be used between the
initialization of the handle and the arrival of the close
callback.
uv.close({handle} [, {callback}]) *uv.close()*
> method form `handle:close([callback])`
Parameters:
- `handle`: `userdata` for sub-type of |uv_handle_t|
- `callback`: `callable` or `nil`
Request handle to be closed. `callback` will be called
asynchronously after this call. This MUST be called on each
handle before memory is released.
Handles that wrap file descriptors are closed immediately but
`callback` will still be deferred to the next iteration of the
event loop. It gives you a chance to free up any resources
associated with the handle.
In-progress requests, like `uv_connect_t` or `uv_write_t`, are
cancelled and have their callbacks called asynchronously with
`ECANCELED`.
Returns: Nothing.
uv.ref({handle}) *uv.ref()*
> method form `handle:ref()`
Parameters:
- `handle`: `userdata` for sub-type of |uv_handle_t|
Reference the given handle. References are idempotent, that
is, if a handle is already referenced calling this function
again will have no effect.
Returns: Nothing.
See |luv-reference-counting|.
uv.unref({handle}) *uv.unref()*
> method form `handle:unref()`
Parameters:
- `handle`: `userdata` for sub-type of |uv_handle_t|
Un-reference the given handle. References are idempotent, that
is, if a handle is not referenced calling this function again
will have no effect.
Returns: Nothing.
See |luv-reference-counting|.
uv.has_ref({handle}) *uv.has_ref()*
> method form `handle:has_ref()`
Parameters:
- `handle`: `userdata` for sub-type of |uv_handle_t|
Returns `true` if the handle referenced, `false` if not.
Returns: `boolean` or `fail`
See |luv-reference-counting|.
uv.send_buffer_size({handle} [, {size}]) *uv.send_buffer_size()*
> method form `handle:send_buffer_size([size])`
Parameters:
- `handle`: `userdata` for sub-type of |uv_handle_t|
- `size`: `integer` or `nil` (default: `0`)
Gets or sets the size of the send buffer that the operating
system uses for the socket.
If `size` is omitted (or `0`), this will return the current
send buffer size; otherwise, this will use `size` to set the
new send buffer size.
This function works for TCP, pipe and UDP handles on Unix and
for TCP and UDP handles on Windows.
Returns:
- `integer` or `fail` (if `size` is `nil` or `0`)
- `0` or `fail` (if `size` is not `nil` and not `0`)
Note: Linux will set double the size and return double the
size of the original set value.
uv.recv_buffer_size({handle} [, {size}]) *uv.recv_buffer_size()*
> method form `handle:recv_buffer_size([size])`
Parameters:
- `handle`: `userdata` for sub-type of |uv_handle_t|
- `size`: `integer` or `nil`