hosc-0.10.1: Haskell Open Sound Control

Sound.OpenSoundControl.Transport

Description

An abstract transport layer. hosc provides implementations for UDP and TCP transport.

Synopsis

Documentation

class Transport t whereSource

Abstract over the underlying transport protocol.

Methods

send :: t -> OSC -> IO ()Source

Encode and send an OSC packet.

recv :: t -> IO OSCSource

Receive and decode an OSC packet.

close :: t -> IO ()Source

Close an existing connection.

withTransport :: Transport t => IO t -> (t -> IO a) -> IO aSource

Bracket OSC communication.

recvT :: Transport t => Double -> t -> IO (Maybe OSC)Source

Variant that wraps recv in an n second timeout.

waitFor :: Transport t => t -> (OSC -> Maybe a) -> IO aSource

Wait for an OSC message where the supplied function does not give Nothing, discarding intervening messages.

wait :: Transport t => t -> String -> IO OSCSource

A waitFor for variant matching on the address string of incoming messages.