Liking cljdoc? Tell your friends :D
Clojure only.

clj.ip


IPcljprotocol

to-bytesclj

(to-bytes this)

Returns the given IP instance as a BigInteger representation of the bytes.

Returns the given IP instance as a BigInteger representation of
the bytes.
source

Rangecljprotocol

compileclj

(compile this)

Compiles the range to a faster version, to optimize when a range is used often. Currently a String (ipv4 and ipv6) can be compiled (but can also be used directly). A compiled range can also be used as a predicate, implicitly calling has-ip?.

Compiles the range to a faster version, to optimize when a range is
used often. Currently a String (ipv4 and ipv6) can be compiled
(but can also be used directly). A compiled range can also be used
as a predicate, implicitly calling `has-ip?`.

has-ip?clj

(has-ip? this ip)

Given this range, compiled or uncompiled, and an IP address in the form of a String (ipv4 or ipv6) or InetAddress, this function checks whether the given IP falls within the range.

Given this range, compiled or uncompiled, and an IP address in the
form of a String (ipv4 or ipv6) or InetAddress, this function
checks whether the given IP falls within the range.
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close