package async_extra

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

A Where_to_connect describes the socket that a tcp client should connect to.

type 'a t constraint 'a = [< Async_unix.Socket.Address.t ]
include sig ... end
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
include sig ... end
val sexp_of_inet : inet -> Sexplib.Sexp.t
include sig ... end
val sexp_of_unix : unix -> Sexplib.Sexp.t
val remote_address : 'a t -> 'a Async_kernel.Deferred.t
val of_host_and_port : ?bind_to_address:Async_unix.Unix.Inet_addr.t -> ?bind_to_port:int -> Core.Host_and_port.t -> inet

bind_to_address and bind_to_port can be used to bind the source IP and port of the underlying socket. This does not necessarily alter the interface used to send the data. In particular, the commonly used destination-based routing is unaffected by binding to a different address.

val of_inet_address : ?bind_to_address:Async_unix.Unix.Inet_addr.t -> ?bind_to_port:int -> Async_unix.Socket.Address.Inet.t -> inet
val of_file : string -> unix
val of_unix_address : Async_unix.Socket.Address.Unix.t -> unix
OCaml

Innovation. Community. Security.