GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::LIBLO (3)

.ds Aq ’

NAME

Net::LibLO - Perl interface for liblo Lightweight OSC library

CONTENTS

SYNOPSIS



  use Net::LibLO;

  my $lo = new Net::LibLO( );
  $lo->add_method( "/reply", s, \&my_handler );
  $lo->send( osc://localhost:5600/, /foo/bar, s, Hello World );



DESCRIPTION

Net::LibLO class is used to send and recieve OSC messages using LibLO (the Lightweight OSC library). The coding style is slightly different to the C interface to LibLO, because it makes use of perl’s Object Oriented functionality.
<B>new( [port], [protocol] )B> Create a new LibLO object for sending a recieving messages. If the port is missing, then a random port number is chosen. If the protocol is missing, than UDP is used.
<B>send( dest, bundle )B> Send a bundle to the sepecified destination.

dest can either be a Net::LibLO::Address object, a URL or a port.

bundle should be a Net::LibLO::Bundle object.

<B>send( dest, path, message )B> Send a message to the sepecified destination.

dest can either be a Net::LibLO::Address object, a URL or a port.

message should be a Net::LibLO::Message object.

<B>send( dest, path, typespec, params... )B> Construct and send a message to the sepecified destination.

dest can either be a Net::LibLO::Address object, a URL or a port.

path is the path to send the message to.

typespec and params are passed through to create the new message.

<B>B>recv()<B>B> Block and wait to receive a single message. Returns the length of the message in bytes or number less than 1 on failure. Length of message is returned, whether the message has been handled by a method or not.
<B>recv_noblock( [timeout] )B> Look for an OSC message waiting to be received. Waits for timeout milliseconds for a message and then returns the length of the message, or 0 if there was no message. Use a value of 0 to return immediatly.
<B>add_method( path, typespec, handler, userdata )B> Add an OSC method to the specifed server.

path is the OSC path to register the method to. If undef is passed the method will match all paths.

typespec is OSC typespec that the method accepts. Incoming messages with similar typespecs (e.g. ones with numerical types in the same position) will be coerced to the typespec given here.

handler is a reference to the method handler callback subroutine that will be called if a matching message is received.

user_data is a value that will be passed to the callback subroutine, when its invoked matching from this method.

<B>my_handler( serv, mesg, path, typespec, userdata, B>@params<B> )B> This is order of parameters that will be passed to your method handler subroutines.

serv is the Net::LibLO object that the method is registered with.

mesg is a Net::LibLO::Message object for the incoming message.

path is the path the incoming message was sent to.

typespec If you specided types in your method creation call then this will match those and the incoming types will have been coerced to match, otherwise it will be the types of the arguments of the incoming message.

userdata This contains the userdata value passed in the call to add_method

params is an array of values associated with the message

<B>B>get_port()<B>B> Returns the port the socket is bound to.
<B>B>get_url()<B>B> Returns the full URL for talking to this server.

SEE ALSO

Net::LibLO::Address

Net::LibLO::Bundle

Net::LibLO::Message

<http://liblo.sourceforge.net/>

AUTHOR

Nicholas J. Humfrey <njh@aelius.com>

COPYRIGHT AND LICENSE

Copyright (C) 2005 Nicholas J. Humfrey

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::LIBLO (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.