package sfml

  1. Overview
  2. Docs
type t
exception Socket_Not_Ready
exception Socket_Disconnected
exception Socket_Error
val init : unit -> unit
val create : unit -> t
val destroy : socket:t -> unit
val connect : socket:t -> port:int -> address:SFIpAddress.t -> ?timeout:SFTime.t -> unit -> unit
val disconnect : socket:t -> unit
val setBlocking : socket:t -> blocking:bool -> unit
val isBlocking : socket:t -> bool
val send : socket:t -> data:string -> unit
val send_sub : socket:t -> data:string -> ofs:int -> len:int -> unit
val receive : socket:t -> data:bytes -> int
val receive_str : socket:t -> string
val sendPacket : socket:t -> packet:SFPacket.t -> unit
val receivePacket : socket:t -> packet:SFPacket.t -> unit
val getLocalPort : socket:t -> int
val getRemotePort : socket:t -> int
val getRemoteAddress : socket:t -> SFIpAddress.t
OCaml

Innovation. Community. Security.