# memberdef

refid: gae5af61a02ab08871d3ea070c8f770cfe
name: lo_address_new
definition: lo_address lo_address_new
type: lo_address
argsstring: (const char *host, const char *port)
detaileddescription:
\param host An IP address or number, or NULL for the local machine.
\param port a decimal port number or service name.

The lo_address object may be used as the target of OSC messages.

Note: if you wish to receive replies from the target of this
address, you must first create a lo_server_thread or lo_server
object which will receive the replies. The last lo_server(_thread)
object craeted will be the receiver.

briefdescription:
Declare an OSC destination, given IP address and port number.
Same as lo_address_new_with_proto(), but using UDP.


refid: gaceb4b068bc48c2b075e790910cab3075
name: lo_address_new_with_proto
definition: lo_address lo_address_new_with_proto
type: lo_address
argsstring: (int proto, const char *host, const char *port)
briefdescription: Declare an OSC destination, given IP address and port number, specifying protocol.
detaileddescription:
\param proto The protocol to use, must be one of LO_UDP, LO_TCP or LO_UNIX.
\param host An IP address or number, or NULL for the local machine.
\param port a decimal port number or service name.

The lo_address object may be used as the target of OSC messages.

Note: if you wish to receive replies from the target of this
address, you must first create a lo_server_thread or lo_server
object which will receive the replies. The last lo_server(_thread)
object created will be the receiver.


refid: gacd72097b92411db148844d89071fd281
name: lo_address_set_ttl
definition: void lo_address_set_ttl
type: void
argsstring: (lo_address t, int ttl)
briefdescription: Set the Time-to-Live value for a given target address.
detaileddescription:
This is required for sending multicast UDP messages.  A value of 1
(the usual case) keeps the message within the subnet, while 255
means a global, unrestricted scope.

\param t An OSC address.
\param ttl An integer specifying the scope of a multicast UDP message.


refid: gafa4253874f97c2c16254ac57d2b7c987
name: lo_send
definition: int lo_send
type: int
argsstring: (lo_address targ, const char *path, const char *type,...)
briefdescription: Send a OSC formatted message to the address specified.
detaileddescription:
\param targ The target OSC address
\param path The OSC path the message will be delivered to
\param type The types of the data items in the message, types are defined in
lo_osc_types.h
\param ... The data values to be transmitted. The types of the arguments
passed here must agree with the types specified in the type parameter.

example:
@code 
lo_send(t, "/foo/bar", "ff", 0.1f, 23.0f);
\endcode

\return -1 on failure.


refid: gaa4a314562b09e2fd00749a5d0b4d0955
name: lo_send_from
definition: int lo_send_from
type: int
argsstring: (lo_address targ, lo_server from, lo_timetag ts, const char *path, const char *type,...)
detaileddescription:
\param targ The target OSC address
\param from The server to send message from   (can be NULL to use new socket)
\param ts   The OSC timetag timestamp at which the message will be processed 
(can be LO_TT_IMMEDIATE if you don't want to attach a timetag)
\param path The OSC path the message will be delivered to
\param type The types of the data items in the message, types are defined in
lo_osc_types.h
\param ... The data values to be transmitted. The types of the arguments
passed here must agree with the types specified in the type parameter.

example:
@code 
serv = lo_server_new(NULL, err);
lo_server_add_method(serv, "/reply", "ss", reply_handler, NULL);
lo_send_from(t, serv, LO_TT_IMMEDIATE, "/foo/bar", "ff", 0.1f, 23.0f);
\endcode

\return on success, the number of bytes sent, or -1 on failure.

briefdescription:
Send a OSC formatted message to the address specified, 
from the same socket as the specified server.


refid: ga42ec6437789c7516c5b7909d8504751a
name: lo_send_timestamped
definition: int lo_send_timestamped
type: int
argsstring: (lo_address targ, lo_timetag ts, const char *path, const char *type,...)
detaileddescription:
\param targ The target OSC address
\param ts The OSC timetag timestamp at which the message will be processed
\param path The OSC path the message will be delivered to
\param type The types of the data items in the message, types are defined in
lo_osc_types.h
\param ... The data values to be transmitted. The types of the arguments
passed here must agree with the types specified in the type parameter.

example:
@code 
lo_timetag now;<br>
lo_timetag_now(&now);<br>
lo_send_timestamped(t, now, "/foo/bar", "ff", 0.1f, 23.0f);
\endcode

\return on success, the number of bytes sent, or -1 on failure.

briefdescription:
Send a OSC formatted message to the address specified, scheduled to
be dispatch at some time in the future.


refid: gaffb2348c70cb0e1214fd50bdc7574c39
name: lo_blob_new
definition: lo_blob lo_blob_new
type: lo_blob
argsstring: (int32_t size, const void *data)
briefdescription: Create a new OSC blob type.
detaileddescription:
\param size The amount of space to allocate in the blob structure.
\param data The data that will be used to initialise the blob, should be
size bytes long.


refid: gad9fa9a716b9df6b60357ea05e6c5f87b
name: lo_version
definition: void lo_version
type: void
briefdescription: Get information on the version of liblo current in use.
argsstring:
(char *verstr, int verstr_size, int *major, int *minor, char *extra, int extra_size, int *lt_major, int *lt_minor, int *lt_bug)

detaileddescription:
All parameters are optional and can be given the value of 0 if that
information is not desired.  For example, to get just the version
as a string, call lo_version(str, size, 0, 0, 0, 0, 0, 0, 0);

The "lt" fields, called the ABI version, corresponds to libtool's
versioning system for binary interface compatibility, and is not
related to the library version number.  This information is usually
encoded in the filename of the shared library.

Typically the string returned in 'verstr' should correspond with
$major.$minor$extra, e.g., "0.28rc".  If no 'extra' information is
present, e.g., "0.28", extra will given the null string.

\param verstr       A buffer to receive a string describing the
                    library version.
\param verstr_size  Size of the buffer pointed to by string.
\param major        Location to receive the library major version.
\param minor        Location to receive the library minor version.
\param extra        Location to receive the library version extra string.
\param extra_size   Size of the buffer pointed to by extra.
\param lt_major     Location to receive the ABI major version.
\param lt_minor     Location to receive the ABI minor version.
\param lt_bug       Location to receive the ABI 'bugfix' version.


refid: ga175a13c6d81adf5c346cdca9bbdcf225
name: lo_send_message
definition: int lo_send_message
type: int
argsstring: (lo_address targ, const char *path, lo_message msg)
briefdescription: Send a lo_message object to target targ.
detaileddescription:
This is slightly more efficient than lo_send() if you want to send a lot of
similar messages. The messages are constructed with the lo_message_new() and
\ref lo_message_add_int32 "lo_message_add*()" functions.


refid: ga9d1aa7c1ee1ce60fe0cf7e3f1e5a6822
name: lo_send_message_from
definition: int lo_send_message_from
type: int
argsstring: (lo_address targ, lo_server serv, const char *path, lo_message msg)
briefdescription: Send a lo_message object to target targ from address of serv.
detaileddescription:
This is slightly more efficient than lo_send() if you want to send a lot of
similar messages. The messages are constructed with the lo_message_new() and
\ref lo_message_add_int32 "lo_message_add*()" functions.

\param targ The address to send the message to
\param serv The server socket to send the message from
             (can be NULL to use new socket)
\param path The path to send the message to
\param msg  The bundle itself


refid: gab5de220b7d6d7c2bf6b0ca4316a54b7a
name: lo_send_bundle_from
definition: int lo_send_bundle_from
type: int
argsstring: (lo_address targ, lo_server serv, lo_bundle b)
briefdescription: Send a lo_bundle object to address targ from address of serv.
detaileddescription:
Bundles are constructed with the
lo_bundle_new() and lo_bundle_add_message() functions.

\param targ The address to send the bundle to
\param serv The server socket to send the bundle from 
             (can be NULL to use new socket)
\param b    The bundle itself


refid: gae4007dd073375b8448a0c8efcb39da52
name: lo_message_incref
definition: void lo_message_incref
type: void
argsstring: (lo_message m)
briefdescription: Add one to a message's reference count.
detaileddescription:
Messages are reference counted. If a message is multiply referenced,
the message's counter should be incremented. It is automatically
decremented by lo_message_free lo_message_free_recursive, with
lo_message_free_recursive being the preferable method.


refid: ga93d3687e77ae20167b82830c917a3e50
name: lo_message_free
definition: void lo_message_free
type: void
argsstring: (lo_message m)
briefdescription:
Free memory allocated by lo_message_new() and any subsequent
\ref lo_message_add_int32 lo_message_add*() calls.


refid: ga4e7a6d91a06e795ded9676d089abea24
name: lo_message_add
definition: int lo_message_add
type: int
argsstring: (lo_message m, const char *types,...)
briefdescription: Append a number of arguments to a message.
detaileddescription:
The data will be added in OSC byteorder (bigendian).

\param m The message to be extended.
\param types The types of the data items in the message, types are defined in
lo_types_common.h
\param ... The data values to be transmitted. The types of the arguments
passed here must agree with the types specified in the type parameter.

\return Less than 0 on failure, 0 on success.


refid: ga9cd98b0c6ad5468692fd0b1936bd093f
name: lo_message_add_varargs
definition: int lo_message_add_varargs
type: int
argsstring: (lo_message m, const char *types, va_list ap)
briefdescription: Append a varargs list to a message.
detaileddescription:
The data will be added in OSC byteorder (bigendian).
IMPORTANT: args list must be terminated with LO_ARGS_END, or this call will
fail.  This is used to do simple error checking on the sizes of parameters
passed.

\param m The message to be extended.
\param types The types of the data items in the message, types are defined in
lo_types_common.h
\param ap The va_list created by a C function declared with an
ellipsis (...) argument, and pre-initialised with
"va_start(ap)". The types of the arguments passed here must agree
with the types specified in the type parameter.

\return Less than 0 on failure, 0 on success.


refid: ga7c9df1bd975a32fb6c8105e6fe327149
name: lo_message_add_int32
definition: int lo_message_add_int32
type: int
argsstring: (lo_message m, int32_t a)
briefdescription: Append a data item and typechar of the specified type to a message.
detaileddescription:
The data will be added in OSC byteorder (bigendian).

\param m The message to be extended.
\param a The data item.

\return Less than 0 on failure, 0 on success.


refid: ga42815097ea691fd1ec0798beca7f8e5e
name: lo_message_add_float
definition: int lo_message_add_float
type: int
argsstring: (lo_message m, float a)
detaileddescription: \return Less than 0 on failure, 0 on success.
briefdescription:
Append a data item and typechar of the specified type to a message.
See lo_message_add_int32() for details.


refid: ga164e068064afa94454eb6515b9b1748d
name: lo_message_get_timestamp
definition: lo_timetag lo_message_get_timestamp
type: lo_timetag
argsstring: (lo_message m)
briefdescription: Returns the timestamp (lo_timetag *) of a bundled incoming message.
detaileddescription:
Returns LO_TT_IMMEDIATE if the message is outgoing, or did not arrive
contained in a bundle. Do not free the returned timetag.


refid: ga5a14045edea33d63792e9a4c82e13b02
name: lo_message_serialise
definition: void* lo_message_serialise
type: void *
argsstring: (lo_message m, const char *path, void *to, size_t *size)
detaileddescription:
\param m The message to be serialised
\param path The path the message will be sent to
\param to The address to serialise to, memory will be allocated if to is
NULL.
\param size If this pointer is non-NULL the size of the memory area
will be written here

The returned form is suitable to be sent over a low level OSC transport,
having the correct endianess and bit-packed structure.

briefdescription:
Serialise the lo_message object to an area of memory and return a
pointer to the serialised form.  Opposite of lo_message_deserialise().


refid: ga2f4644b2a1aae0d0eee456fe93ac158e
name: lo_message_deserialise
definition: lo_message lo_message_deserialise
type: lo_message
argsstring: (void *data, size_t size, int *result)
detaileddescription:
\param data Pointer to the raw OSC message data in network transmission form
(network byte order where appropriate).
\param size The size of data in bytes
\param result If this pointer is non-NULL, the result or error code will
be written here.

Returns a new lo_message, or NULL if deserialisation fails.
Use lo_message_free() to free the resulting object.

briefdescription:
Deserialise a raw OSC message and return a new lo_message object.
Opposite of lo_message_serialise().


refid: ga9e96445401c94c3751de27f8db1a0b50
name: lo_server_dispatch_data
definition: int lo_server_dispatch_data
type: int
argsstring: (lo_server s, void *data, size_t size)
briefdescription: Dispatch a raw block of memory containing an OSC message.
detaileddescription:
This is useful when a raw block of memory is available that is
structured as OSC, and you wish to use liblo to dispatch the
message to a handler function as if it had been received over the
network.

\param s The lo_server to use for dispatching.
\param data Pointer to the raw OSC message data in network transmission form
(network byte order where appropriate).
\param size The size of data in bytes

Returns the number of bytes used if successful, or less than 0 otherwise.


refid: ga7dbaa4a6dfc9d7369cfbca195809be3c
name: lo_address_get_hostname
definition: const char* lo_address_get_hostname
type: const char *
argsstring: (lo_address a)
briefdescription: Return the hostname of a lo_address object.
detaileddescription:
Returned value must not be modified or free'd. Value will be a dotted quad,
colon'd IPV6 address, or resolvable name.


refid: ga75bc15ab78de049c0e0d7e24a0d6d0c1
name: lo_address_get_port
definition: const char* lo_address_get_port
type: const char *
argsstring: (lo_address a)
briefdescription: Return the port/service name of a lo_address object.
detaileddescription:
Returned value must not be modified or free'd. Value will be a service name
or ASCII representation of the port number.


refid: ga734c5864de14a04c9e58f82d6efe4624
name: lo_address_set_iface
definition: int lo_address_set_iface
type: int
argsstring: (lo_address t, const char *iface, const char *ip)
briefdescription: Set the network interface to use for a given target address.
detaileddescription:
The caller should specify either the iface or ip variable.  The IP,
if specified, should match the same network family as the OSC
address.  (That is, should correctly correspond to IPv4 or IPv6.)
Typically the assigned network interface will only be used in the
case of sending multicast messages.  It is recommended to use the
if_nameindex POSIX function to get a list of network interface
names.

\param t An OSC address.
\param iface The name of a network interface on the local system.
\param ip The IP address of a network interface on the local system.
\return 0 if the interface was successfully identified, or non-zero
        otherwise.


refid: ga2bf32a3899bd51e1054532af727a8024
name: lo_address_get_iface
definition: const char* lo_address_get_iface
type: const char *
argsstring: (lo_address t)
briefdescription: Get the name of the network interface assigned to an OSC address.
detaileddescription:
\param t An OSC address.
\return A string pointer or 0 if no interface has been assigned.
        Caller should not modify the provided string.  It is a
        legal pointer until the next call to lo_address_set_iface
        or lo_address_free.


refid: ga9d73ff7267077cc69f632cbfeb30a23e
name: lo_address_set_tcp_nodelay
definition: int lo_address_set_tcp_nodelay
type: int
argsstring: (lo_address t, int enable)
briefdescription: Set the TCP_NODELAY flag on outgoing TCP connections.
detaileddescription:
\param t The address to set this flag for.
\param enable Non-zero to set the flag, zero to unset it.
\return the previous value of this flag.


refid: ga6034e180b4f6c64097d9ec1fd3d8872e
name: lo_address_set_stream_slip
definition: int lo_address_set_stream_slip
type: int
argsstring: (lo_address t, int enable)
detaileddescription:
\param t The address to set this flag for.
\param enable Non-zero to set the flag, zero to unset it.
\return the previous value of this flag.

briefdescription:
Set outgoing stream connections (e.g., TCP) to be
       transmitted using the SLIP packetizing protocol.


refid: ga330a4a4e6227b185b3ec6219ff3e2859
name: lo_bundle_new
definition: lo_bundle lo_bundle_new
type: lo_bundle
argsstring: (lo_timetag tt)
briefdescription: Create a new bundle object.
detaileddescription:
OSC Bundles encapsulate one or more OSC messages and may include a timestamp
indicating when the bundle should be dispatched.

\param tt The timestamp when the bundle should be handled by the receiver.
          Pass LO_TT_IMMEDIATE if you want the receiving server to dispatch
          the bundle as soon as it receives it.


refid: gaef50603d58b7d9b9dfe77fabb426a528
name: lo_bundle_incref
definition: void lo_bundle_incref
type: void
argsstring: (lo_bundle b)
briefdescription: Add one to a bundle's reference count.
detaileddescription:
Bundles are reference counted. If a bundle is multiply referenced,
the bundle's counter should be incremented. It is automatically
decremented by lo_bundle_free lo_bundle_free_recursive, with
lo_bundle_free_recursive being the preferable method.


refid: ga1cc5e2eb20ce567a694f343764e25bb7
name: lo_bundle_add_message
definition: int lo_bundle_add_message
type: int
argsstring: (lo_bundle b, const char *path, lo_message m)
briefdescription: Adds an OSC message to an existing bundle.
detaileddescription:
The message passed is appended to the list of messages in the bundle to be
dispatched to 'path'.

\return 0 if successful, less than 0 otherwise.


refid: gad28eb5916f4d5c153069a56c1252f482
name: lo_bundle_add_bundle
definition: int lo_bundle_add_bundle
type: int
argsstring: (lo_bundle b, lo_bundle n)
briefdescription: Adds an OSC bundle to an existing bundle.
detaileddescription:
The child bundle passed is appended to the list of child bundles|messages in the parent bundle to be
dispatched.

\return 0 if successful, less than 0 otherwise.


refid: ga8c0a37924636ab24666246a3c595e959
name: lo_bundle_get_type
definition: lo_element_type lo_bundle_get_type
type: lo_element_type
argsstring: (lo_bundle b, int index)
briefdescription: Gets the element type contained within a bundle.
detaileddescription:
Returns a lo_element_type at a given index within a bundle.

\return The requested lo_element_type if successful, otherwise 0.


refid: gaafb86e502cd5f9b0a0f834409e0a8e6a
name: lo_bundle_get_bundle
definition: lo_bundle lo_bundle_get_bundle
type: lo_bundle
argsstring: (lo_bundle b, int index)
briefdescription: Gets a nested bundle contained within a bundle.
detaileddescription:
Returns a lo_bundle at a given index within a bundle.

\return The requested lo_bundle if successful, otherwise 0.


refid: ga18eef47e89f323e18027ce05f350833b
name: lo_bundle_get_message
definition: lo_message lo_bundle_get_message
type: lo_message
argsstring: (lo_bundle b, int index, const char **path)
briefdescription: Gets a message contained within a bundle.
detaileddescription:
Returns a lo_message at a given index within a bundle, and
optionally the path associated with that message.

\return The requested lo_message if successful, otherwise 0.


refid: gaeea3d61d6a4ae9efbd476f16d2758817
name: lo_bundle_get_timestamp
definition: lo_timetag lo_bundle_get_timestamp
type: lo_timetag
argsstring: (lo_bundle b)
briefdescription: Get the timestamp associated with a bundle.
detaileddescription:
\param b The bundle for which the timestamp should be returned.

\return The timestamp of the bundle as a lo_timetag.


refid: gaea61bc73c281efe4e2f95456e4d0f9f5
name: lo_bundle_serialise
definition: void* lo_bundle_serialise
type: void *
argsstring: (lo_bundle b, void *to, size_t *size)
briefdescription: Serialise the bundle object to an area of memory and return a pointer to the serialised form.
detaileddescription:
\param b The bundle to be serialised
\param to The address to serialise to, memory will be allocated if to is
NULL.
\param size If this pointer is non-NULL the size of the memory area
will be written here

The returned form is suitable to be sent over a low level OSC transport,
having the correct endianess and bit-packed structure.


refid: gaf85d7a54ab80e1b2a3d17c4cfef38402
name: lo_coerce
definition: int lo_coerce
type: int
argsstring: (lo_type type_to, lo_arg *to, lo_type type_from, lo_arg *from)
briefdescription: Attempt to convert one OSC type to another.
detaileddescription:
Numerical types (eg LO_INT32, LO_FLOAT etc.) may be converted to other
numerical types and string types (LO_STRING and LO_SYMBOL) may be converted
to the other type. This is done automatically if a received message matches
the path, but not the exact types, and is coercible (ie. all numerical
types in numerical positions).

On failure no translation occurs and false is returned.

\param type_to   The type of the destination variable.
\param to        A pointer to the destination variable.
\param type_from The type of the source variable.
\param from      A pointer to the source variable.


refid: ga78cfb23346e44465695293d4393447ae
name: lo_server_new
definition: lo_server lo_server_new
type: lo_server
argsstring: (const char *port, lo_err_handler err_h)
briefdescription: Create a new server instance.
detaileddescription:
Using lo_server_recv(), lo_servers block until they receive OSC
messages.  If you want non-blocking behaviour see
lo_server_recv_noblock() or the \ref lo_server_thread_new
"lo_server_thread_*" functions.

\param port If NULL is passed then an unused UDP port will be chosen by the
system, its number may be retrieved with lo_server_thread_get_port()
so it can be passed to clients. Otherwise a decimal port number, service
name or UNIX domain socket path may be passed.
\param err_h An error callback function that will be called if there is an
error in messge reception or server creation. Pass NULL if you do not want
error handling.


refid: ga4afa474b11ed0d4511857ae79c56aaa1
name: lo_server_new_with_proto
definition: lo_server lo_server_new_with_proto
type: lo_server
argsstring: (const char *port, int proto, lo_err_handler err_h)
briefdescription: Create a new server instance, specifying protocol.
detaileddescription:
Using lo_server_recv(), lo_servers block until they receive OSC
messages.  If you want non-blocking behaviour see
lo_server_recv_noblock() or the \ref lo_server_thread_new
"lo_server_thread_*" functions.

\param port If using UDP then NULL may be passed to find an unused port.
Otherwise a decimal port number orservice name or may be passed.
If using UNIX domain sockets then a socket path should be passed here.
\param proto The protocol to use, should be one of LO_UDP, LO_TCP or LO_UNIX.
\param err_h An error callback function that will be called if there is an
error in messge reception or server creation. Pass NULL if you do not want
error handling.


refid: ga849f4517a29ad850069cf8f2976a9284
name: lo_server_new_multicast
definition: lo_server lo_server_new_multicast
type: lo_server
argsstring: (const char *group, const char *port, lo_err_handler err_h)
briefdescription: Create a new server instance, and join a UDP multicast group.
detaileddescription:
\param group The multicast group to join.  See documentation on IP
multicast for the acceptable address range; e.g., http://tldp.org/HOWTO/Multicast-HOWTO-2.html
\param port If using UDP then NULL may be passed to find an unused port.
Otherwise a decimal port number or service name or may be passed.
If using UNIX domain sockets then a socket path should be passed here.
\param err_h An error callback function that will be called if there is an
error in messge reception or server creation. Pass NULL if you do not want
error handling.


refid: gadec49f210324f499f2e9593df20128cb
name: lo_server_new_multicast_iface
definition: lo_server lo_server_new_multicast_iface
type: lo_server
argsstring: (const char *group, const char *port, const char *iface, const char *ip, lo_err_handler err_h)
detaileddescription:
\param group The multicast group to join.  See documentation on IP
multicast for the acceptable address range; e.g., http://tldp.org/HOWTO/Multicast-HOWTO-2.html
\param port If using UDP then NULL may be passed to find an unused port.
Otherwise a decimal port number or service name or may be passed.
If using UNIX domain sockets then a socket path should be passed here.
\param iface A string specifying the name of a network interface to
use, or zero if not specified.
\param ip A string specifying the IP address of a network interface
to use, or zero if not specified.
\param err_h An error callback function that will be called if there is an
error in messge reception or server creation. Pass NULL if you do not want
error handling.

briefdescription:
Create a new server instance, and join a UDP multicast
group, optionally specifying which network interface to use.
Note that usually only one of iface or ip are specified.


refid: ga1246a1f4a2ba967d31017452a32daf2a
name: lo_server_new_from_url
definition: lo_server lo_server_new_from_url
type: lo_server
argsstring: (const char *url, lo_err_handler err_h)
briefdescription: Create a new server instance, taking port and the optional multicast group IP from an URL string.
detaileddescription:
\param url The URL to specify the server parameters.
\param err_h An error callback function that will be called if there is an
error in messge reception or server creation. Pass NULL if you do not want
error handling.
\return A new lo_server instance.


refid: ga175ef81fc2d695895967bfc30a495b2a
name: lo_server_enable_coercion
definition: int lo_server_enable_coercion
type: int
argsstring: (lo_server server, int enable)
briefdescription: Enables or disables type coercion during message dispatch.
detaileddescription:
\param server The server to toggle this option for.
\param enable Non-zero to enable, or zero to disable type coercion.
\return The previous value of this option.


refid: ga33cdcfbab89d58f82175386a76698822
name: lo_server_wait
definition: int lo_server_wait
type: int
argsstring: (lo_server s, int timeout)
briefdescription: Wait for an OSC message to be received.
detaileddescription:
\param s The server to wait for connections on.
\param timeout A timeout in milliseconds to wait for the incoming packet.
a value of 0 will return immediately.

The return value is 1 if there is a message waiting or 0 if
there is no message. If there is a message waiting you can now
call lo_server_recv() to receive that message.


refid: ga784a257252d05cc0e7210f4691f0661b
name: lo_server_recv_noblock
definition: int lo_server_recv_noblock
type: int
argsstring: (lo_server s, int timeout)
briefdescription: Look for an OSC message waiting to be received.
detaileddescription:
\param s The server to wait for connections on.
\param timeout A timeout in milliseconds to wait for the incoming packet.
a value of 0 will return immediately.

The return value is the number of bytes in the received message or 0 if
there is no message. The message will be dispatched to a matching method
if one is found.


refid: gaebef3611d24e4b5f60f16cce76a9e271
name: lo_server_recv
definition: int lo_server_recv
type: int
argsstring: (lo_server s)
briefdescription: Block, waiting for an OSC message to be received.
detaileddescription:
The return value is the number of bytes in the received message. The message
will be dispatched to a matching method if one is found.


refid: ga0c183cabaac67eb9aad3265ae1efa580
name: lo_server_add_method
definition: lo_method lo_server_add_method
type: lo_method
argsstring: (lo_server s, const char *path, const char *typespec, lo_method_handler h, void *user_data)
briefdescription: Add an OSC method to the specifed server.
detaileddescription:
\param s The server the method is to be added to.
\param path The OSC path to register the method to. If NULL is passed the
method will match all paths.
\param typespec The typespec 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.
\param h The method handler callback function that will be called if a
matching message is received
\param user_data A value that will be passed to the callback function, h,
when its invoked matching from this method.


refid: gaf834a6d62de7dcceaede62325e74c763
name: lo_server_del_method
definition: void lo_server_del_method
type: void
argsstring: (lo_server s, const char *path, const char *typespec)
briefdescription: Delete an OSC method from the specifed server.
detaileddescription:
\param s The server the method is to be removed from.
\param path The OSC path of the method to delete. If NULL is passed the
method will match the generic handler.
\param typespec The typespec the method accepts.


refid: ga1411fdb0c8037a4dd3ab19af35df50ac
name: lo_server_add_bundle_handlers
definition: int lo_server_add_bundle_handlers
type: int
argsstring: (lo_server s, lo_bundle_start_handler sh, lo_bundle_end_handler eh, void *user_data)
briefdescription: Add bundle notification handlers to the specified server.
detaileddescription:
\param s The server the method is to be added to.
\param sh The callback function that will be called before the messages
of a bundle are dispatched
\param eh The callback function that will be called after the messages
of a bundle are dispatched
\param user_data A value that will be passed to the user_data parameter
of both callback functions.


refid: gae11ca5a5b4ec2943d5a04642ba5052ae
name: lo_server_get_socket_fd
definition: int lo_server_get_socket_fd
type: int
argsstring: (lo_server s)
briefdescription: Return the file descriptor of the server socket.
detaileddescription:
If the server protocol supports exposing the server's underlying
receive mechanism for monitoring with select() or poll(), this function
returns the file descriptor needed, otherwise, it returns -1.

WARNING: when using this function beware that not all OSC packets that are
received are dispatched immediately. lo_server_events_pending() and
lo_server_next_event_delay() can be used to tell if there are pending
events and how long before you should attempt to receive them.


refid: ga3e23b9b6027042e136f344d001431ac6
name: lo_server_enable_queue
definition: int lo_server_enable_queue
type: int
argsstring: (lo_server s, int queue_enabled, int dispatch_remaining)
detaileddescription:
\param s A liblo server
\param queue_enabled Zero to disable queue, non-zero to enable.
\param dispatch_remaining If non-zero, previously queued messages
                          will be immediately dispatched when queue
                          is disabled.
\return The previous state of queue behaviour.  Zero if queueing
        was previously disabled, non-zero otherwise.

briefdescription:
Toggle event queue.
If queueing is enabled, timetagged messages that are sent in
advance of the current time will be put on an internal queue, and
they will be dispatched at the indicated time.  By default,
queueing is enabled.  Use this function to disable it, if it is
desired to have a server process messages immediately.  In that
case, use lo_message_get_timestamp() to get the message timestamp
from within a method handler.


refid: ga04feb1063c3f4df6fec41405b28dd99a
name: lo_server_events_pending
definition: int lo_server_events_pending
type: int
argsstring: (lo_server s)
briefdescription:
Return true if there are scheduled events (eg. from bundles) 
waiting to be dispatched by the server.


refid: ga58266d3085b73fc4dc5e1913de810b22
name: lo_url_get_protocol
definition: char* lo_url_get_protocol
type: char *
argsstring: (const char *url)
briefdescription: Return the protocol portion of an OSC URL, eg. udp, tcp.
detaileddescription:
This library uses OSC URLs of the form: osc.prot://hostname:port/path if the
prot part is missing, UDP is assumed.

The return value should be free()'d when it is no longer needed.


refid: ga0550cc91417b530c26a360b10072a3cb
name: lo_url_get_protocol_id
definition: int lo_url_get_protocol_id
type: int
argsstring: (const char *url)
briefdescription: Return the protocol ID of an OSC URL.
detaileddescription:
This library uses OSC URLs of the form: osc.prot://hostname:port/path if the
prot part is missing, UDP is assumed.
Returned value will be one of LO_UDP, LO_TCP, LO_UNIX or -1.

\return An integer specifying the protocol. Return -1 when the protocol is
not supported by liblo.


refid: gadeddaa8c418eec4600ef1f3099d24f42
name: lo_send_timestamped_internal
definition: int lo_send_timestamped_internal
type: int
argsstring:
(lo_address t, const char *file, const int line, lo_timetag ts, const char *path, const char *types,...)


refid: gacf95994303f815825ed7053b9519ca3f
name: lo_send_from_internal
definition: int lo_send_from_internal
type: int
argsstring:
(lo_address targ, lo_server from, const char *file, const int line, const lo_timetag ts, const char *path, const char *types,...)


refid: gad38872ce4270bbfed9d62a655a4facab
name: lo_get_path
definition: char* lo_get_path
type: char *
argsstring: (void *data, ssize_t size)
briefdescription: Given a raw OSC message, return the message path.
detaileddescription:
\param data      A pointer to the raw OSC message data.
\param size      The size of data in bytes (total buffer bytes).

Returns the message path or NULL if an error occurs.
Do not free() the returned pointer.


refid: ga29fc246595334f29d97d11b0186b17bd
name: lo_arg_host_endian
definition: void lo_arg_host_endian
type: void
argsstring: (lo_type type, void *data)
briefdescription: Convert the specified argument to host byte order where necessary.
detaileddescription:
\param type The OSC type of the data item (eg. LO_FLOAT).
\param data A pointer to the data item to be converted. It is changed
in-place.


refid: ga1699678a3a2d4221bb55fa2e05326ef0
name: lo_arg_pp
definition: void lo_arg_pp
type: void
argsstring: (lo_type type, void *data)
briefdescription: Pretty-print a set of typed arguments.
detaileddescription:
\param type A type string in the form provided to lo_send().
\param data An OSC data pointer, like that provided in the
lo_method_handler.


refid: ga11838c576b0197c255ce805fd7434736
name: lo_type
briefdescription: An enumeration of the OSC types liblo can send and receive.
detaileddescription:
The value of the enumeration is the typechar used to tag messages and to
specify arguments with lo_send().


refid: abe3e0c31189adfd7624de6c507b610ba
name: lo_server_thread_new
definition: lo_server_thread lo_server_thread_new
type: lo_server_thread
argsstring: (const char *port, lo_err_handler err_h)
briefdescription: Create a new server thread to handle incoming OSC messages.
detaileddescription:
Server threads take care of the message reception and dispatch by
transparently creating a system thread to handle incoming messages.
Use this if you do not want to handle the threading yourself.

\param port If NULL is passed then an unused port will be chosen by the
system, its number may be retrieved with lo_server_thread_get_port()
so it can be passed to clients. Otherwise a decimal port number, service
name or UNIX domain socket path may be passed.
\param err_h A function that will be called in the event of an error being
raised. The function prototype is defined in lo_types.h


refid: a0fa9fcae4eabe09847d46b134dc33aa4
name: lo_server_thread_new_multicast
definition: lo_server_thread lo_server_thread_new_multicast
type: lo_server_thread
argsstring: (const char *group, const char *port, lo_err_handler err_h)
briefdescription: Create a new server thread to handle incoming OSC messages, and join a UDP multicast group.
detaileddescription:
Server threads take care of the message reception and dispatch by
transparently creating a system thread to handle incoming messages.
Use this if you do not want to handle the threading yourself.

\param group The multicast group to join.  See documentation on IP
multicast for the acceptable address range; e.g., http://tldp.org/HOWTO/Multicast-HOWTO-2.html
\param port If NULL is passed then an unused port will be chosen by the
system, its number may be retrieved with lo_server_thread_get_port()
so it can be passed to clients. Otherwise a decimal port number, service
name or UNIX domain socket path may be passed.
\param err_h A function that will be called in the event of an error being
raised. The function prototype is defined in lo_types.h


refid: a6713cedfb0b2c4f066ec8a19366bf095
name: lo_server_thread_new_with_proto
definition: lo_server_thread lo_server_thread_new_with_proto
type: lo_server_thread
argsstring: (const char *port, int proto, lo_err_handler err_h)
briefdescription: Create a new server thread to handle incoming OSC messages, specifying protocol.
detaileddescription:
Server threads take care of the message reception and dispatch by
transparently creating a system thread to handle incoming messages.
Use this if you do not want to handle the threading yourself.

\param port If NULL is passed then an unused port will be chosen by the
system, its number may be retrieved with lo_server_thread_get_port()
so it can be passed to clients. Otherwise a decimal port number, service
name or UNIX domain socket path may be passed.
\param proto The protocol to use, should be one of LO_UDP, LO_TCP or LO_UNIX.
\param err_h A function that will be called in the event of an error being
raised. The function prototype is defined in lo_types.h


refid: aac49abadaaac33408eae4060bb44b9a2
name: lo_server_thread_new_from_url
definition: lo_server_thread lo_server_thread_new_from_url
type: lo_server_thread
argsstring: (const char *url, lo_err_handler err_h)
briefdescription: Create a new server thread, taking port and the optional multicast group IP from an URL string.
detaileddescription:
\param url The URL to specify the server parameters.
\param err_h An error callback function that will be called if there is an
error in messge reception or server creation. Pass NULL if you do not want
error handling.
\return A new lo_server_thread instance.


refid: acff9c90a8efc400448276b2d20831010
name: lo_server_thread_add_method
definition: lo_method lo_server_thread_add_method
type: lo_method
argsstring: (lo_server_thread st, const char *path, const char *typespec, lo_method_handler h, void *user_data)
briefdescription: Add an OSC method to the specifed server thread.
detaileddescription:
\param st The server thread the method is to be added to.
\param path The OSC path to register the method to. If NULL is passed the
method will match all paths.
\param typespec The typespec 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.
\param h The method handler callback function that will be called it a
matching message is received
\param user_data A value that will be passed to the callback function, h,
when its invoked matching from this method.


refid: a072edf53338bc807444c4b510643a828
name: lo_server_thread_del_method
definition: void lo_server_thread_del_method
type: void
argsstring: (lo_server_thread st, const char *path, const char *typespec)
briefdescription: Delete an OSC method from the specifed server thread.
detaileddescription:
\param st The server thread the method is to be removed from.
\param path The OSC path of the method to delete. If NULL is passed the
method will match the generic handler.
\param typespec The typespec the method accepts.


refid: a7bc3d8361b65e3ad112a1da956d9114e
name: lo_server_thread_events_pending
definition: int lo_server_thread_events_pending
type: int
argsstring: (lo_server_thread st)
briefdescription:
Return true if there are scheduled events (eg. from bundles) waiting
to be dispatched by the thread.


refid: a59067bf50cf8abb4371da6f03c9036c9
name: lo_server
definition: typedef void* lo_server
type: void *
briefdescription: An object representing an instance of an OSC server.
detaileddescription:
Created by calls to lo_server_new(). If you wish to have the server
operate in a background thread, use lo_server_thread instead.


refid: aa5d2e4aa0ff9d4459fcc76e7ed5839fc
name: lo_err_handler
definition: typedef void(* lo_err_handler)(int num, const char *msg, const char *where)
type: void(*
argsstring: )(int num, const char *msg, const char *where)
briefdescription: A callback function to receive notification of an error in a server or server thread.
detaileddescription:
On callback the parameters will be set to the following values:

\param num An error number that can be used to identify this condition.
\param msg An error message describing the condidtion.
\param where A string describing the place the error occured - typically
either a function call or method path.


refid: a3b1c86c0925d05e13b5438ce8fe80a6c
name: lo_method_handler
type: int(*
argsstring: )(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
definition:
typedef int(* lo_method_handler)(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)

detaileddescription:
The return value tells the method dispatcher whether this handler
has dealt with the message correctly: a return value of 0 indicates
that it has been handled, and it should not attempt to pass it on
to any other handlers, non-0 means that it has not been handled and
the dispatcher will attempt to find more handlers that match the
path and types of the incoming message.

On callback the paramters will be set to the following values:

\param path That path that the incoming message was sent to
\param types 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.
\param argv An array of lo_arg types containing the values, e.g. if the
first argument of the incoming message is of type 'f' then the value will be
found in argv[0]->f.
\param argc The number of arguments received.
\param msg A structure containing the original raw message as received. No
type coercion will have occured and the data will be in OSC byte order
(bigendian).
\param user_data This contains the user_data value passed in the call to
lo_server_thread_add_method.

briefdescription:
A callback function to receive notification of matching message
arriving in the server or server thread.


refid: a40484ab2ebc1413ffe465558a638d329
name: lo_bundle_start_handler
definition: typedef int(* lo_bundle_start_handler)(lo_timetag time, void *user_data)
type: int(*
argsstring: )(lo_timetag time, void *user_data)
detaileddescription:
This callback allows applications to be aware of incoming bundles
and preserve ordering and atomicity of messages in bundles.

If installed with lo_server_add_bundle_handlers, this callback will be
called with \a time set to the time tag of the bundle, and \a user_data
set to the user_data parameter passed to lo_server_add_bundle_handlers.

Note that bundles may be nested, in which case calls to the bundle start
and end handlers will also be nested.  The application can keep track of
nested bundles in a stack-like manner by treating the start handler as
"push" and the end handler as "pop".  For example, a bundle containing two
bundles would fire 6 callbacks: begin, begin, end, begin, end, end.

briefdescription:
A callback function to receive notification of a bundle being
dispatched by the server or server thread.


refid: a3074807a4e7379c1b101c303567b7e42
name: lo_bundle_end_handler
definition: typedef int(* lo_bundle_end_handler)(void *user_data)
type: int(*
argsstring: )(void *user_data)
detaileddescription:
If installed with lo_server_add_bundle_handlers, this callback will be
called after all the messages of a bundle have been dispatched with
\a user_data set to the user_data parameter passed to
lo_server_add_bundle_handlers.

briefdescription:
A callback function to receive notification of a bundle dispatch
being completed by the server or server thread.


