liblo: lo_serverthread.h Source File

liblo 0.31

lo_serverthread.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2014 Steve Harris et al. (see AUTHORS)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2.1
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * $Id$
15 */
16
17 #ifndef LO_SERVERTHREAD_H
18 #define LO_SERVERTHREAD_H
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
44 lo_server_thread lo_server_thread_new(const char *port, lo_err_handler err_h);
45
63 lo_server_thread lo_server_thread_new_multicast(const char *group, const char *port,
64 lo_err_handler err_h);
65
84 lo_server_thread lo_server_thread_new_multicast_iface(const char *group, const char *port,
85 const char *iface, const char *ip,
86 lo_err_handler err_h);
87
104 lo_server_thread lo_server_thread_new_with_proto(const char *port, int proto,
105 lo_err_handler err_h);
106
117 lo_server_thread lo_server_thread_new_from_url(const char *url,
118 lo_err_handler err_h);
119
125 void lo_server_thread_free(lo_server_thread st);
126
141 lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
142 const char *typespec, lo_method_handler h,
143 const void *user_data);
144
153 void lo_server_thread_del_method(lo_server_thread st, const char *path,
154 const char *typespec);
155
164 int lo_server_thread_del_lo_method(lo_server_thread st, lo_method m);
165
178 void lo_server_thread_set_callbacks(lo_server_thread st,
179 lo_server_thread_init_callback init,
180 lo_server_thread_cleanup_callback cleanup,
181 void *user_data);
182
189 int lo_server_thread_start(lo_server_thread st);
190
197 int lo_server_thread_stop(lo_server_thread st);
198
202 int lo_server_thread_get_port(lo_server_thread st);
203
209 char *lo_server_thread_get_url(lo_server_thread st);
210
217 lo_server lo_server_thread_get_server(lo_server_thread st);
218
221 int lo_server_thread_events_pending(lo_server_thread st);
222
223 void lo_server_thread_set_error_context(lo_server_thread st, void *user_data);
224
226 void lo_server_thread_pp(lo_server_thread st);
227
228 #ifdef __cplusplus
229 }
230 #endif
231
232 #endif
lo_server_thread_get_url
char * lo_server_thread_get_url(lo_server_thread st)
Return a URL describing the address of the server thread.
lo_server_thread_new
lo_server_thread lo_server_thread_new(const char *port, lo_err_handler err_h)
Create a new server thread to handle incoming OSC messages.
lo_server_thread_set_callbacks
void lo_server_thread_set_callbacks(lo_server_thread st, lo_server_thread_init_callback init, lo_server_thread_cleanup_callback cleanup, void *user_data)
Set an init and/or a cleanup function to the specifed server thread.
lo_server_thread_new_multicast_iface
lo_server_thread lo_server_thread_new_multicast_iface(const char *group, const char *port, const char *iface, const char *ip, lo_err_handler err_h)
Create a new server thread instance, and join a UDP multicast group, optionally specifying which netw...
lo_server_thread_start
int lo_server_thread_start(lo_server_thread st)
Start the server thread.
lo_server_thread_new_from_url
lo_server_thread lo_server_thread_new_from_url(const char *url, lo_err_handler err_h)
Create a new server thread, taking port and the optional multicast group IP from an URL string.
lo_server_thread_add_method
lo_method lo_server_thread_add_method(lo_server_thread st, const char *path, const char *typespec, lo_method_handler h, const void *user_data)
Add an OSC method to the specifed server thread.
lo_method_handler
int(* lo_method_handler)(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
A callback function to receive notification of matching message arriving in the server or server thre...
Definition: lo_types.h:134
lo_server_thread_events_pending
int lo_server_thread_events_pending(lo_server_thread st)
Return true if there are scheduled events (eg. from bundles) waiting to be dispatched by the thread.
lo_server_thread_get_server
lo_server lo_server_thread_get_server(lo_server_thread st)
Return the lo_server for a lo_server_thread.
lo_server_thread_new_with_proto
lo_server_thread lo_server_thread_new_with_proto(const char *port, int proto, lo_err_handler err_h)
Create a new server thread to handle incoming OSC messages, specifying protocol.
lo_server_thread
void * lo_server_thread
An object representing a thread containing an OSC server.
Definition: lo_types.h:92
lo_server_thread_new_multicast
lo_server_thread lo_server_thread_new_multicast(const char *group, const char *port, lo_err_handler err_h)
Create a new server thread to handle incoming OSC messages, and join a UDP multicast group.
lo_server_thread_cleanup_callback
void(* lo_server_thread_cleanup_callback)(lo_server_thread s, void *user_data)
A callback function to perform cleanup when the server thread is started.
Definition: lo_types.h:192
lo_err_handler
void(* lo_err_handler)(int num, const char *msg, const char *where)
A callback function to receive notification of an error in a server or server thread.
Definition: lo_types.h:105
lo_server_thread_stop
int lo_server_thread_stop(lo_server_thread st)
Stop the server thread.
lo_server_thread_del_lo_method
int lo_server_thread_del_lo_method(lo_server_thread st, lo_method m)
Delete an OSC method from the specified server thread.
lo_server
void * lo_server
An object representing an instance of an OSC server.
Definition: lo_types.h:85
lo_server_thread_get_port
int lo_server_thread_get_port(lo_server_thread st)
Return the port number that the server thread has bound to.
lo_server_thread_init_callback
int(* lo_server_thread_init_callback)(lo_server_thread s, void *user_data)
A callback function to perform initialization when the server thread is started.
Definition: lo_types.h:179
lo_server_thread_pp
void lo_server_thread_pp(lo_server_thread st)
Pretty-print a lo_server_thread object.
lo_server_thread_free
void lo_server_thread_free(lo_server_thread st)
Free memory taken by a server thread.
lo_method
void * lo_method
An object representing an method on a server.
Definition: lo_types.h:77
lo_server_thread_del_method
void lo_server_thread_del_method(lo_server_thread st, const char *path, const char *typespec)
Delete an OSC method from the specifed server thread.