Module OcsfmlNetwork.IPAddress

module IPAddress: sig .. end

type t = OcsfmlNetwork.IPAddressBase.t 
val get_local_address : unit -> OcsfmlNetwork.ip_address
Get the computer's local address.

The local address is the address of the computer from the LAN point of view, i.e. something like 192.168.1.56. It is meaningful only for communications over the local network. Unlike get_public_address, this function is fast and may be used safely anywhere.

val get_public_address : ?timeout:OcsfmlSystem.Time.t -> unit -> OcsfmlNetwork.ip_address
Get the computer's public address.

The public address is the address of the computer from the internet point of view, i.e. something like 89.54.1.169. It is necessary for communications over the world wide web. The only way to get a public address is to ask it to a distant website; as a consequence, this function depends on both your network connection and the server, and may be very slow. You should use it as few as possible. Because this function depends on the network connection and on a distant server, you may use a time limit if you don't want your program to be possibly stuck waiting in case there is a problem; this limit is deactivated by default.

timeout : Maximum time to wait
val none : OcsfmlNetwork.ip_address
Value representing an empty/invalid address.
val localhost : OcsfmlNetwork.ip_address
The "localhost" address (for connecting a computer to itself locally)
val equal : OcsfmlNetwork.ip_address -> OcsfmlNetwork.ip_address -> bool