IPv4
IPv4(host::Integer) -> IPv4
Returns IPv4 object from ip address formatted as Integer
Examples
julia> IPv4(3232235776)
IPv4(192.168.1.0)
This example creates an IPv4
object from the IP address represented as an integer. The integer 3232235776
corresponds to the IP address 192.168.1.0
, and the IPv4
object is returned.
Common mistake example:
julia> IPv4(4294967296)
ERROR: ArgumentError: Invalid IPv4 address: 4294967296
In this example, the provided integer value 4294967296
is outside the valid range for an IPv4 address. Ensure that the integer value corresponds to a valid IPv4 address before using the IPv4
function.
See Also
accept, bind, :@spawn, connect, fetch, getaddrinfo, gethostname, getipaddr, getsockname, init_worker, IPv4, IPv6, isready, issocket, kill, listen, recv, recvfrom, remotecall, remotecall_fetch, remotecall_wait, RemoteRef, send, setopt,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.