(bind-chan! chan)
(bind-chan! chan port)
Bind a channel's datagram socket to its local port or the specified one if explicitly passed in.
Bind a channel's datagram socket to its local port or the specified one if explicitly passed in.
(client-peer host port)
(client-peer host port send-nested-osc-bundles?)
Returns an OSC client ready to communicate with a host on a given port. Clients also listen for incoming messages (such as responses from the server it communicates with.
Returns an OSC client ready to communicate with a host on a given port. Clients also listen for incoming messages (such as responses from the server it communicates with.
(close-peer peer & wait)
Close a peer, also works for clients and servers.
Close a peer, also works for clients and servers.
(peer)
(peer listen? send-nested-osc-bundles?)
Create a generic peer which is capable of both sending and receiving/handling OSC messages via a DatagramChannel (UDP).
Sending: Creates a thread for sending packets out which which will pull OSC message maps from the :send-q, encode them to binary and send them using the fn in :send-fn (defaults to chan-send). Allowing the :send-fn to be modified allows for libraries such as Overtone to not actually transmit OSC packets out over the channel, but to send them via a different transport mechanism.
Receiving/Handling: If passed an optional param listen? will also start a thread listening for incoming packets. Peers may have listeners and/or handlers registered to recieve incoming messages. A listener is sent every message received, and handlers are dispatched by OSC node (a.k.a. path).
You must explicitly bind the peer's :chan to receive incoming messages.
Create a generic peer which is capable of both sending and receiving/handling OSC messages via a DatagramChannel (UDP). Sending: Creates a thread for sending packets out which which will pull OSC message maps from the :send-q, encode them to binary and send them using the fn in :send-fn (defaults to chan-send). Allowing the :send-fn to be modified allows for libraries such as Overtone to not actually transmit OSC packets out over the channel, but to send them via a different transport mechanism. Receiving/Handling: If passed an optional param listen? will also start a thread listening for incoming packets. Peers may have listeners and/or handlers registered to recieve incoming messages. A listener is sent every message received, and handlers are dispatched by OSC node (a.k.a. path). You must explicitly bind the peer's :chan to receive incoming messages.
(peer-handle peer path handler)
Register a new handler with peer on path. Replaces previous handler if one already exists.
Register a new handler with peer on path. Replaces previous handler if one already exists.
(peer-handler-paths peer)
(peer-handler-paths peer path)
Returns the number of handlers in a peer
Returns the number of handlers in a peer
(peer-recv peer path handler timeout)
Register a one-shot handler with peer with specified timeout. If timeout is nil then timeout is ignored.
Register a one-shot handler with peer with specified timeout. If timeout is nil then timeout is ignored.
(peer-reply-msg peer msg msg-to-reply-to)
Send OSC msg to peer
Send OSC msg to peer
(peer-rm-all-handlers peer path)
Remove all handlers from peer recursively down from path
Remove all handlers from peer recursively down from path
(peer-rm-handler peer path)
Remove handler from peer with specific key associated with path
Remove handler from peer with specific key associated with path
(peer-send-bundle peer bundle)
Send OSC bundle to peer.
Send OSC bundle to peer.
(register-zero-conf-service service-name port)
Register zeroconf service with name service-name and port.
Register zeroconf service with name service-name and port.
(server-peer port zero-conf-name)
(server-peer port zero-conf-name send-nested-osc-bundles?)
Returns a live OSC server ready to register handler functions.
Returns a live OSC server ready to register handler functions.
(turn-zero-conf-off)
Unregister all zeroconf services and close zeroconf down.
Unregister all zeroconf services and close zeroconf down.
(turn-zero-conf-on)
Turn zeroconf on and register all services in zero-conf-services* if any.
Turn zeroconf on and register all services in zero-conf-services* if any.
(unregister-zero-conf-service port)
Unregister zeroconf service registered with port.
Unregister zeroconf service registered with port.
(update-peer-target peer host port)
Update the target address of an OSC client so future calls to osc-send will go to a new destination. Also updates zeroconf registration.
Update the target address of an OSC client so future calls to osc-send will go to a new destination. Also updates zeroconf registration.
(zero-conf-running?)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close