Utilities for Art-Net network I/O, including address coercion and channel configuration.
Provides helpers for java.net.InetAddress and java.nio.channels.DatagramChannel setup, isolated from protocol logic.
Utilities for Art-Net network I/O, including address coercion and channel configuration. Provides helpers for java.net.InetAddress and java.nio.channels.DatagramChannel setup, isolated from protocol logic.
(->socket-address {:keys [host port]})Coerces {:host ... :port ...} map to InetSocketAddress. Defaults port to 6454 (0x1936) if nil.
Coerces {:host ... :port ...} map to InetSocketAddress.
Defaults port to 6454 (0x1936) if nil.(as-inet-address host)Coerces host representation to InetAddress.
Accepts InetAddress, String, or nil (defaults to 0.0.0.0).
Coerces host representation to InetAddress. Accepts InetAddress, String, or nil (defaults to 0.0.0.0).
Default Art-Net UDP port (0x1936 = 6454).
Default Art-Net UDP port (0x1936 = 6454).
(detect-local-ip)Detects the primary non-loopback IPv4 address.
Returns [a b c d] vector or nil. Prefers Art-Net IP address ranges (2.x.x.x, 10.x.x.x) per spec.
Detects the primary non-loopback IPv4 address. Returns [a b c d] vector or nil. Prefers Art-Net IP address ranges (2.x.x.x, 10.x.x.x) per spec.
(detect-mac-address ip-octets)Detects MAC address for a given IP address.
Returns [m1 m2 m3 m4 m5 m6] vector or nil if not found. Looks up the network interface associated with the IP address. Returns nil for nil input or invalid IP format.
Detects MAC address for a given IP address. Returns [m1 m2 m3 m4 m5 m6] vector or nil if not found. Looks up the network interface associated with the IP address. Returns nil for nil input or invalid IP format.
(limited-broadcast-address? addr)Returns true if addr is the limited broadcast address 255.255.255.255.
Returns true if addr is the limited broadcast address 255.255.255.255.
(open-channel {:keys [bind broadcast? reuse-address?]
:or {broadcast? true reuse-address? true}})Opens and configures a DatagramChannel for Art-Net I/O.
Options:
Opens and configures a DatagramChannel for Art-Net I/O.
Options:
- :bind -> Bind address map {:host ... :port ...}
- :broadcast? -> Enable SO_BROADCAST (default true)
- :reuse-address? -> Enable SO_REUSEADDR (default true)(parse-host host)Parses host to [a b c d] vector.
Accepts: IP address string, vector, or nil. Returns nil for nil input.
Parses host to [a b c d] vector. Accepts: IP address string, vector, or nil. Returns nil for nil input.
(sender-from-socket addr)Extracts sender info {:host ... :port ...} from a SocketAddress. Returns nil if the address is not an InetSocketAddress.
Extracts sender info {:host ... :port ...} from a SocketAddress.
Returns nil if the address is not an InetSocketAddress.(wildcard? host)Returns true if the host represents any IP address (0.0.0.0 or nil).
Returns true if the host represents any IP address (0.0.0.0 or nil).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |