\doxysection{lo\+\_\+serverthread.\+h File Reference}
\hypertarget{lo__serverthread_8h}{}\label{lo__serverthread_8h}\index{lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} \doxymbox{\hyperlink{lo__serverthread_8h_abe3e0c31189adfd7624de6c507b610ba}{lo\+\_\+server\+\_\+thread\+\_\+new}} (const char \texorpdfstring{$\ast$}{*}port, \doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h)
\begin{DoxyCompactList}\small\item\em Create a new server thread to handle incoming OSC messages. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} \doxymbox{\hyperlink{lo__serverthread_8h_a0fa9fcae4eabe09847d46b134dc33aa4}{lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+multicast}} (const char \texorpdfstring{$\ast$}{*}group, const char \texorpdfstring{$\ast$}{*}port, \doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h)
\begin{DoxyCompactList}\small\item\em Create a new server thread to handle incoming OSC messages, and join a UDP multicast group. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} \doxymbox{\hyperlink{lo__serverthread_8h_ad6d57101bbdaa6571ed76373b2c3a50a}{lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+multicast\+\_\+iface}} (const char \texorpdfstring{$\ast$}{*}group, const char \texorpdfstring{$\ast$}{*}port, const char \texorpdfstring{$\ast$}{*}iface, const char \texorpdfstring{$\ast$}{*}ip, \doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h)
\begin{DoxyCompactList}\small\item\em Create a new server thread 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. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} \doxymbox{\hyperlink{lo__serverthread_8h_a6713cedfb0b2c4f066ec8a19366bf095}{lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+with\+\_\+proto}} (const char \texorpdfstring{$\ast$}{*}port, int proto, \doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h)
\begin{DoxyCompactList}\small\item\em Create a new server thread to handle incoming OSC messages, specifying protocol. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} \doxymbox{\hyperlink{lo__serverthread_8h_aac49abadaaac33408eae4060bb44b9a2}{lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+from\+\_\+url}} (const char \texorpdfstring{$\ast$}{*}url, \doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h)
\begin{DoxyCompactList}\small\item\em Create a new server thread, taking port and the optional multicast group IP from an URL string. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} \doxymbox{\hyperlink{lo__serverthread_8h_ae961a24cc5bd1e5ecc19023801cae504}{lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+from\+\_\+config}} (\doxymbox{\hyperlink{structlo__server__config}{lo\+\_\+server\+\_\+config}} \texorpdfstring{$\ast$}{*}config)
\begin{DoxyCompactList}\small\item\em Create a new server thread, using a configuration struct. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{lo__serverthread_8h_ad72be3f2a81b9583ad69dd007080c0e5}{lo\+\_\+server\+\_\+thread\+\_\+free}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Free memory taken by a server thread. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_af7b2be2fe593905cfaa9149efff4cc28}{lo\+\_\+method}} \doxymbox{\hyperlink{lo__serverthread_8h_af500729c76fd5bb4798d350b6307adc1}{lo\+\_\+server\+\_\+thread\+\_\+add\+\_\+method}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st, const char \texorpdfstring{$\ast$}{*}path, const char \texorpdfstring{$\ast$}{*}typespec, \doxymbox{\hyperlink{lo__types_8h_a5b38e0822e47acaa3c7267348f50f66c}{lo\+\_\+method\+\_\+handler}} h, const void \texorpdfstring{$\ast$}{*}user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Add an OSC method to the specifed server thread. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{lo__serverthread_8h_a072edf53338bc807444c4b510643a828}{lo\+\_\+server\+\_\+thread\+\_\+del\+\_\+method}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st, const char \texorpdfstring{$\ast$}{*}path, const char \texorpdfstring{$\ast$}{*}typespec)
\begin{DoxyCompactList}\small\item\em Delete an OSC method from the specifed server thread. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{lo__serverthread_8h_a28733dd7fc8e8df6969674779d74fddd}{lo\+\_\+server\+\_\+thread\+\_\+del\+\_\+lo\+\_\+method}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st, \doxymbox{\hyperlink{lo__types_8h_af7b2be2fe593905cfaa9149efff4cc28}{lo\+\_\+method}} m)
\begin{DoxyCompactList}\small\item\em Delete an OSC method from the specified server thread. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{lo__serverthread_8h_ab4d5248ecc0d55e46c0f025e727ceb52}{lo\+\_\+server\+\_\+thread\+\_\+set\+\_\+callbacks}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st, \doxymbox{\hyperlink{lo__types_8h_aed5d674714d659d776d848d716d9efbc}{lo\+\_\+server\+\_\+thread\+\_\+init\+\_\+callback}} init, \doxymbox{\hyperlink{lo__types_8h_a2be941151f7a8ae193ba1687b41b2dc4}{lo\+\_\+server\+\_\+thread\+\_\+cleanup\+\_\+callback}} cleanup, void \texorpdfstring{$\ast$}{*}user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Set an init and/\+or a cleanup function to the specifed server thread. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{lo__serverthread_8h_a4b284c1b96d0354c5de4ff7ba5a44fbc}{lo\+\_\+server\+\_\+thread\+\_\+start}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Start the server thread. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{lo__serverthread_8h_a06992ac46b04e58cb77d7c519a578f57}{lo\+\_\+server\+\_\+thread\+\_\+stop}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Stop the server thread. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{lo__serverthread_8h_a22f4b18eeac41490647ab9fe2333f933}{lo\+\_\+server\+\_\+thread\+\_\+get\+\_\+port}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Return the port number that the server thread has bound to. \end{DoxyCompactList}\item 
char \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{lo__serverthread_8h_a34f979730e9929f4096d99ebc0add075}{lo\+\_\+server\+\_\+thread\+\_\+get\+\_\+url}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Return a URL describing the address of the server thread. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{lo__types_8h_a009a4f26c17bfcc1c31efc45499d09b8}{lo\+\_\+server}} \doxymbox{\hyperlink{lo__serverthread_8h_ab968d51fa6e0d4bea92e3f84f5556161}{lo\+\_\+server\+\_\+thread\+\_\+get\+\_\+server}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Return the \doxylink{lo__types_8h_a009a4f26c17bfcc1c31efc45499d09b8}{lo\+\_\+server} for a \doxylink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{lo__serverthread_8h_a7bc3d8361b65e3ad112a1da956d9114e}{lo\+\_\+server\+\_\+thread\+\_\+events\+\_\+pending}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Return true if there are scheduled events (eg. from bundles) waiting to be dispatched by the thread. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{lo__serverthread_8h_a6ba794aacbb04dada6939980ce71381a}{lo\+\_\+server\+\_\+thread\+\_\+pp}} (\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} st)
\begin{DoxyCompactList}\small\item\em Pretty-\/print a \doxylink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread} object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The liblo headerfile declaring thread-\/related functions. 

Definition in file \doxymbox{\hyperlink{lo__serverthread_8h_source}{lo\+\_\+serverthread.\+h}}.



\label{doc-func-members}
\Hypertarget{lo__serverthread_8h_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{lo__serverthread_8h_af500729c76fd5bb4798d350b6307adc1}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_add\_method@{lo\_server\_thread\_add\_method}}
\index{lo\_server\_thread\_add\_method@{lo\_server\_thread\_add\_method}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_add\_method()}{lo\_server\_thread\_add\_method()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_af500729c76fd5bb4798d350b6307adc1} 
\doxymbox{\hyperlink{lo__types_8h_af7b2be2fe593905cfaa9149efff4cc28}{lo\+\_\+method}} lo\+\_\+server\+\_\+thread\+\_\+add\+\_\+method (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{path}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{typespec}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_a5b38e0822e47acaa3c7267348f50f66c}{lo\+\_\+method\+\_\+handler}}}]{h}{, }\item[{const void \texorpdfstring{$\ast$}{*}}]{user\+\_\+data}{}\end{DoxyParamCaption})}



Add an OSC method to the specifed server thread. 


\begin{DoxyParams}{Parameters}
{\em st} & The server thread the method is to be added to. \\
\hline
{\em path} & The OSC path to register the method to. If NULL is passed the method will match all paths. \\
\hline
{\em 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. \\
\hline
{\em h} & The method handler callback function that will be called it a matching message is received \\
\hline
{\em user\+\_\+data} & A value that will be passed to the callback function, h, when its invoked matching from this method. \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_a28733dd7fc8e8df6969674779d74fddd}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_del\_lo\_method@{lo\_server\_thread\_del\_lo\_method}}
\index{lo\_server\_thread\_del\_lo\_method@{lo\_server\_thread\_del\_lo\_method}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_del\_lo\_method()}{lo\_server\_thread\_del\_lo\_method()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a28733dd7fc8e8df6969674779d74fddd} 
int lo\+\_\+server\+\_\+thread\+\_\+del\+\_\+lo\+\_\+method (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_af7b2be2fe593905cfaa9149efff4cc28}{lo\+\_\+method}}}]{m}{}\end{DoxyParamCaption})}



Delete an OSC method from the specified server thread. 


\begin{DoxyParams}{Parameters}
{\em st} & The server thread the method is to be removed from. \\
\hline
{\em m} & The \doxylink{lo__types_8h_af7b2be2fe593905cfaa9149efff4cc28}{lo\+\_\+method} identifier returned from lo\+\_\+server\+\_\+add\+\_\+method for the method to delete from the server. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Non-\/zero if it was not found in the list of methods for the server. 
\end{DoxyReturn}
\Hypertarget{lo__serverthread_8h_a072edf53338bc807444c4b510643a828}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_del\_method@{lo\_server\_thread\_del\_method}}
\index{lo\_server\_thread\_del\_method@{lo\_server\_thread\_del\_method}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_del\_method()}{lo\_server\_thread\_del\_method()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a072edf53338bc807444c4b510643a828} 
void lo\+\_\+server\+\_\+thread\+\_\+del\+\_\+method (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{path}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{typespec}{}\end{DoxyParamCaption})}



Delete an OSC method from the specifed server thread. 


\begin{DoxyParams}{Parameters}
{\em st} & The server thread the method is to be removed from. \\
\hline
{\em path} & The OSC path of the method to delete. If NULL is passed the method will match the generic handler. \\
\hline
{\em typespec} & The typespec the method accepts. \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_a7bc3d8361b65e3ad112a1da956d9114e}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_events\_pending@{lo\_server\_thread\_events\_pending}}
\index{lo\_server\_thread\_events\_pending@{lo\_server\_thread\_events\_pending}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_events\_pending()}{lo\_server\_thread\_events\_pending()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a7bc3d8361b65e3ad112a1da956d9114e} 
int lo\+\_\+server\+\_\+thread\+\_\+events\+\_\+pending (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Return true if there are scheduled events (eg. from bundles) waiting to be dispatched by the thread. 

\Hypertarget{lo__serverthread_8h_ad72be3f2a81b9583ad69dd007080c0e5}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_free@{lo\_server\_thread\_free}}
\index{lo\_server\_thread\_free@{lo\_server\_thread\_free}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_free()}{lo\_server\_thread\_free()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_ad72be3f2a81b9583ad69dd007080c0e5} 
void lo\+\_\+server\+\_\+thread\+\_\+free (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Free memory taken by a server thread. 

Frees the memory, and, if currently running will stop the associated thread. \Hypertarget{lo__serverthread_8h_a22f4b18eeac41490647ab9fe2333f933}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_get\_port@{lo\_server\_thread\_get\_port}}
\index{lo\_server\_thread\_get\_port@{lo\_server\_thread\_get\_port}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_get\_port()}{lo\_server\_thread\_get\_port()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a22f4b18eeac41490647ab9fe2333f933} 
int lo\+\_\+server\+\_\+thread\+\_\+get\+\_\+port (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Return the port number that the server thread has bound to. 

\Hypertarget{lo__serverthread_8h_ab968d51fa6e0d4bea92e3f84f5556161}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_get\_server@{lo\_server\_thread\_get\_server}}
\index{lo\_server\_thread\_get\_server@{lo\_server\_thread\_get\_server}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_get\_server()}{lo\_server\_thread\_get\_server()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_ab968d51fa6e0d4bea92e3f84f5556161} 
\doxymbox{\hyperlink{lo__types_8h_a009a4f26c17bfcc1c31efc45499d09b8}{lo\+\_\+server}} lo\+\_\+server\+\_\+thread\+\_\+get\+\_\+server (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Return the \doxylink{lo__types_8h_a009a4f26c17bfcc1c31efc45499d09b8}{lo\+\_\+server} for a \doxylink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}. 

This function is useful for passing a thread\textquotesingle{}s \doxylink{lo__types_8h_a009a4f26c17bfcc1c31efc45499d09b8}{lo\+\_\+server} to \doxylink{group__liblo_gaa4a314562b09e2fd00749a5d0b4d0955}{lo\+\_\+send\+\_\+from()}. \Hypertarget{lo__serverthread_8h_a34f979730e9929f4096d99ebc0add075}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_get\_url@{lo\_server\_thread\_get\_url}}
\index{lo\_server\_thread\_get\_url@{lo\_server\_thread\_get\_url}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_get\_url()}{lo\_server\_thread\_get\_url()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a34f979730e9929f4096d99ebc0add075} 
char \texorpdfstring{$\ast$}{*} lo\+\_\+server\+\_\+thread\+\_\+get\+\_\+url (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Return a URL describing the address of the server thread. 

Return value must be free()\textquotesingle{}d to reclaim memory. \Hypertarget{lo__serverthread_8h_abe3e0c31189adfd7624de6c507b610ba}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_new@{lo\_server\_thread\_new}}
\index{lo\_server\_thread\_new@{lo\_server\_thread\_new}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_new()}{lo\_server\_thread\_new()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_abe3e0c31189adfd7624de6c507b610ba} 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} lo\+\_\+server\+\_\+thread\+\_\+new (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{port}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h}{}\end{DoxyParamCaption})}



Create a new server thread to handle incoming OSC messages. 

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.


\begin{DoxyParams}{Parameters}
{\em port} & If NULL is passed then an unused port will be chosen by the system, its number may be retrieved with \doxylink{lo__serverthread_8h_a22f4b18eeac41490647ab9fe2333f933}{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. \\
\hline
{\em err\+\_\+h} & A function that will be called in the event of an error being raised. The function prototype is defined in \doxylink{lo__types_8h}{lo\+\_\+types.\+h} \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_ae961a24cc5bd1e5ecc19023801cae504}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_new\_from\_config@{lo\_server\_thread\_new\_from\_config}}
\index{lo\_server\_thread\_new\_from\_config@{lo\_server\_thread\_new\_from\_config}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_new\_from\_config()}{lo\_server\_thread\_new\_from\_config()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_ae961a24cc5bd1e5ecc19023801cae504} 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+from\+\_\+config (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{structlo__server__config}{lo\+\_\+server\+\_\+config}} \texorpdfstring{$\ast$}{*}}]{config}{}\end{DoxyParamCaption})}



Create a new server thread, using a configuration struct. 


\begin{DoxyParams}{Parameters}
{\em config} & A pre-\/initialized config struct. A pointer to it will not be kept. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new \doxylink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread} instance. 
\end{DoxyReturn}
\Hypertarget{lo__serverthread_8h_aac49abadaaac33408eae4060bb44b9a2}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_new\_from\_url@{lo\_server\_thread\_new\_from\_url}}
\index{lo\_server\_thread\_new\_from\_url@{lo\_server\_thread\_new\_from\_url}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_new\_from\_url()}{lo\_server\_thread\_new\_from\_url()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_aac49abadaaac33408eae4060bb44b9a2} 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+from\+\_\+url (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{url}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h}{}\end{DoxyParamCaption})}



Create a new server thread, taking port and the optional multicast group IP from an URL string. 


\begin{DoxyParams}{Parameters}
{\em url} & The URL to specify the server parameters. \\
\hline
{\em 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. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new \doxylink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread} instance. 
\end{DoxyReturn}
\Hypertarget{lo__serverthread_8h_a0fa9fcae4eabe09847d46b134dc33aa4}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_new\_multicast@{lo\_server\_thread\_new\_multicast}}
\index{lo\_server\_thread\_new\_multicast@{lo\_server\_thread\_new\_multicast}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_new\_multicast()}{lo\_server\_thread\_new\_multicast()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a0fa9fcae4eabe09847d46b134dc33aa4} 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+multicast (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{group}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{port}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h}{}\end{DoxyParamCaption})}



Create a new server thread to handle incoming OSC messages, and join a UDP multicast group. 

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.


\begin{DoxyParams}{Parameters}
{\em group} & The multicast group to join. See documentation on IP multicast for the acceptable address range; e.\+g., \href{http://tldp.org/HOWTO/Multicast-HOWTO-2.html}{\texttt{http:\+/\+/\+tldp.\+org/\+\+HOWTO/\+\+Multicast-\/\+HOWTO-\/2.\+html}} \\
\hline
{\em port} & If NULL is passed then an unused port will be chosen by the system, its number may be retrieved with \doxylink{lo__serverthread_8h_a22f4b18eeac41490647ab9fe2333f933}{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. \\
\hline
{\em err\+\_\+h} & A function that will be called in the event of an error being raised. The function prototype is defined in \doxylink{lo__types_8h}{lo\+\_\+types.\+h} \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_ad6d57101bbdaa6571ed76373b2c3a50a}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_new\_multicast\_iface@{lo\_server\_thread\_new\_multicast\_iface}}
\index{lo\_server\_thread\_new\_multicast\_iface@{lo\_server\_thread\_new\_multicast\_iface}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_new\_multicast\_iface()}{lo\_server\_thread\_new\_multicast\_iface()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_ad6d57101bbdaa6571ed76373b2c3a50a} 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+multicast\+\_\+iface (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{group}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{port}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{iface}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{ip}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h}{}\end{DoxyParamCaption})}



Create a new server thread 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. 


\begin{DoxyParams}{Parameters}
{\em group} & The multicast group to join. See documentation on IP multicast for the acceptable address range; e.\+g., \href{http://tldp.org/HOWTO/Multicast-HOWTO-2.html}{\texttt{http:\+/\+/\+tldp.\+org/\+\+HOWTO/\+\+Multicast-\/\+HOWTO-\/2.\+html}} \\
\hline
{\em 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. \\
\hline
{\em iface} & A string specifying the name of a network interface to use, or zero if not specified. \\
\hline
{\em ip} & A string specifying the IP address of a network interface to use, or zero if not specified. \\
\hline
{\em 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. \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_a6713cedfb0b2c4f066ec8a19366bf095}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_new\_with\_proto@{lo\_server\_thread\_new\_with\_proto}}
\index{lo\_server\_thread\_new\_with\_proto@{lo\_server\_thread\_new\_with\_proto}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_new\_with\_proto()}{lo\_server\_thread\_new\_with\_proto()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a6713cedfb0b2c4f066ec8a19366bf095} 
\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}} lo\+\_\+server\+\_\+thread\+\_\+new\+\_\+with\+\_\+proto (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{port}{, }\item[{int}]{proto}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h}{}\end{DoxyParamCaption})}



Create a new server thread to handle incoming OSC messages, specifying protocol. 

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.


\begin{DoxyParams}{Parameters}
{\em port} & If NULL is passed then an unused port will be chosen by the system, its number may be retrieved with \doxylink{lo__serverthread_8h_a22f4b18eeac41490647ab9fe2333f933}{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. \\
\hline
{\em proto} & The protocol to use, should be one of LO\+\_\+\+UDP, LO\+\_\+\+TCP or LO\+\_\+\+UNIX. \\
\hline
{\em err\+\_\+h} & A function that will be called in the event of an error being raised. The function prototype is defined in \doxylink{lo__types_8h}{lo\+\_\+types.\+h} \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_a6ba794aacbb04dada6939980ce71381a}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_pp@{lo\_server\_thread\_pp}}
\index{lo\_server\_thread\_pp@{lo\_server\_thread\_pp}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_pp()}{lo\_server\_thread\_pp()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a6ba794aacbb04dada6939980ce71381a} 
void lo\+\_\+server\+\_\+thread\+\_\+pp (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Pretty-\/print a \doxylink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread} object. 

\Hypertarget{lo__serverthread_8h_ab4d5248ecc0d55e46c0f025e727ceb52}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_set\_callbacks@{lo\_server\_thread\_set\_callbacks}}
\index{lo\_server\_thread\_set\_callbacks@{lo\_server\_thread\_set\_callbacks}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_set\_callbacks()}{lo\_server\_thread\_set\_callbacks()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_ab4d5248ecc0d55e46c0f025e727ceb52} 
void lo\+\_\+server\+\_\+thread\+\_\+set\+\_\+callbacks (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_aed5d674714d659d776d848d716d9efbc}{lo\+\_\+server\+\_\+thread\+\_\+init\+\_\+callback}}}]{init}{, }\item[{\doxymbox{\hyperlink{lo__types_8h_a2be941151f7a8ae193ba1687b41b2dc4}{lo\+\_\+server\+\_\+thread\+\_\+cleanup\+\_\+callback}}}]{cleanup}{, }\item[{void \texorpdfstring{$\ast$}{*}}]{user\+\_\+data}{}\end{DoxyParamCaption})}



Set an init and/\+or a cleanup function to the specifed server thread. 

To have any effect, it must be called before the server thread is started.


\begin{DoxyParams}{Parameters}
{\em st} & The server thread to which the method is to be added. \\
\hline
{\em init} & The init function to be called just after thread start. May be NULL. \\
\hline
{\em cleanup} & The cleanup function to be called just before thread exit. May be NULL. \\
\hline
{\em user\+\_\+data} & A value that will be passed to the callback functions. \\
\hline
\end{DoxyParams}
\Hypertarget{lo__serverthread_8h_a4b284c1b96d0354c5de4ff7ba5a44fbc}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_start@{lo\_server\_thread\_start}}
\index{lo\_server\_thread\_start@{lo\_server\_thread\_start}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_start()}{lo\_server\_thread\_start()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a4b284c1b96d0354c5de4ff7ba5a44fbc} 
int lo\+\_\+server\+\_\+thread\+\_\+start (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Start the server thread. 


\begin{DoxyParams}{Parameters}
{\em st} & the server thread to start. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Less than 0 on failure, 0 on success. 
\end{DoxyReturn}
\Hypertarget{lo__serverthread_8h_a06992ac46b04e58cb77d7c519a578f57}\index{lo\_serverthread.h@{lo\_serverthread.h}!lo\_server\_thread\_stop@{lo\_server\_thread\_stop}}
\index{lo\_server\_thread\_stop@{lo\_server\_thread\_stop}!lo\_serverthread.h@{lo\_serverthread.h}}
\doxysubsubsection{\texorpdfstring{lo\_server\_thread\_stop()}{lo\_server\_thread\_stop()}}
{\footnotesize\ttfamily \label{lo__serverthread_8h_a06992ac46b04e58cb77d7c519a578f57} 
int lo\+\_\+server\+\_\+thread\+\_\+stop (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{lo__types_8h_ade4a4a955cce22c288e0b1b756e4b1cb}{lo\+\_\+server\+\_\+thread}}}]{st}{}\end{DoxyParamCaption})}



Stop the server thread. 


\begin{DoxyParams}{Parameters}
{\em st} & the server thread to start. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Less than 0 on failure, 0 on success. 
\end{DoxyReturn}
