package tiny_libs

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

Module TransportSource

Sourcetype t = {
  1. send : string -> unit;
  2. receive : unit -> string list;
  3. status : unit -> string;
  4. player : unit -> int option;
}
Sourcetype role =
  1. | Host of {
    1. bind : string;
    2. port : int;
    }
  2. | Join of {
    1. host : string;
    2. port : int;
    }
  3. | Relay of {
    1. host : string;
    2. port : int;
    }
Sourceval set_connect : (Cap.network -> role -> (t, string) result) -> unit
Sourceval connect : < Cap.network.. > -> role -> (t, string) result
Sourceval set_tunnel : (Cap.exec -> host:string -> port:int -> (t, string) result) -> unit
Sourceval tunnel : < Cap.exec.. > -> host:string -> port:int -> (t, string) result
Sourceval set_tls : (Cap.network -> host:string -> port:int -> (t, string) result) -> unit
Sourceval tls : < Cap.network.. > -> host:string -> port:int -> (t, string) result