Constructs a new Server object, which can receive OSC messages.
port may be a decimal port number or a UNIX socket path.
If omitted, a random free UDP port will be used.
Exceptions: ServerError
Returns the server's URL.
Returns the server's port number.
Registers a callback function for OSC messages with matching path and argument types.
For both path and typespec, None may be used as a wildcard.
The optional user_data will be passed on to the callback function.
callback_func may be a global function or a class method, pyliblo will know what to do either way.
User-defined callback function, to be registered using add_method();
called when a matching OSC message is received.
args will be a list of objects of type Argument, each containing the argument's typespec and data,
which can be accessed through args[n].type and args[n].value, respectively.
src is an Address object, containing the address the message came from.
src and user_data may be omitted if not needed.
Receives and dispatches an OSC message.
Blocking by default, unless timeout (in ms) is specified.
timeout may be 0, in which case recv() returns immediately.
Returns True if a message was received, False otherwise.
Sends a message from this server to the the given target.
target may be an Address object, a port number, a (hostname,port) tuple, or a URL.
See Message for possible argument types.
Exceptions: AddressError
Constructs a new Address object from the given hostname/port or URL.
Exceptions: AddressError
Returns the address' URL.
Returns the address' hostname.
Returns the address' port number.
Constructs a new Message object.
Appends the given argument(s) to the message.
Each argument may be an int, float, string, or a (typespec,data) tuple to allow for greater control over the type to be transmitted.
data type | typespec | argument |
---|---|---|
int32 | 'i' | int |
int64 | 'h' | int, long |
float | 'f' | float |
double | 'd' | float |
char | 'c' | single-character string |
string | 's' | string |
blob | 'b' | list, tuple, array.array('B') |
Sends a message to the the given target, without requiring a server.
target may be an Address object, a port number, a (hostname,port) tuple, or a URL.
See Message for possible argument types.
Exceptions: AddressError