package sfml

  1. Overview
  2. Docs
type t
exception Socket_Not_Ready
exception Socket_Disconnected
exception Socket_Partial
exception Socket_Error
val init : unit -> unit
val create : unit -> t
val destroy : socket:t -> unit
val setBlocking : socket:t -> blocking:bool -> unit
val bind : socket:t -> ?address:SFIpAddress.t -> port:int -> unit
val unbind : socket:t -> unit
val send : socket:t -> data:string -> address:SFIpAddress.t -> port:int -> unit
val receive : socket:t -> data:bytes -> int * SFIpAddress.t * int
val sendPacket : socket:t -> packet:SFPacket.t -> address:SFIpAddress.t -> port:int -> unit
val receivePacket : socket:t -> packet:SFPacket.t -> SFIpAddress.t * int
val isBlocking : socket:t -> bool
val getLocalPort : socket:t -> int
val maxDatagramSize : unit -> int
OCaml

Innovation. Community. Security.