package luv

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Connected UDP sockets.

This module requires libuv 1.27.0 or higher.

Feature check: Luv.Require.(has udp_connect)

val connect : t -> Sockaddr.t -> (unit, Error.t) result

Assigns a peer address to the given socket.

Binds uv_udp_connect.

val disconnect : t -> (unit, Error.t) result

Removes the peer address assigned to the given socket.

Binds uv_udp_connect with NULL argument.

val getpeername : t -> (Sockaddr.t, Error.t) result

Retrieves the peer address assigned to the given socket.

Binds uv_udp_getpeername.

val send : t -> Buffer.t list -> ((unit, Error.t) result -> unit) -> unit

Like Luv.UDP.send, but the remote address used is the peer address assigned to the socket.

Binds uv_udp_send.

val try_send : t -> Buffer.t list -> (unit, Error.t) result

Like Luv.UDP.try_send, but the remote address used is the peer address assigned to the socket.

Binds uv_udp_try_send.

OCaml

Innovation. Community. Security.