\hypertarget{classlo_1_1Server}{}\section{lo\+:\+:Server Class Reference}
\label{classlo_1_1Server}\index{lo\+::\+Server@{lo\+::\+Server}}


Class representing a local O\+SC server, proxy for \mbox{\hyperlink{lo__types_8h_a59067bf50cf8abb4371da6f03c9036c9}{lo\+\_\+server}}.  




Inherited by \mbox{\hyperlink{classlo_1_1ServerThread}{lo\+::\+Server\+Thread}}.

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classlo_1_1Server_abf695f157836b714e1e250b47bc018b3}{Server}} (\mbox{\hyperlink{lo__types_8h_a59067bf50cf8abb4371da6f03c9036c9}{lo\+\_\+server}} s)
\item 
{\footnotesize template$<$typename E $>$ }\\\mbox{\hyperlink{classlo_1_1Server_a65262c3e0bebd348fe07474dfee59150}{Server}} (const num\+\_\+string\+\_\+type \&port, E \&\&e)
\item 
{\footnotesize template$<$typename E $>$ }\\\mbox{\hyperlink{classlo_1_1Server_a56985c15c0efa0c1d61ffb25bbdc47a3}{Server}} (const num\+\_\+string\+\_\+type \&port, int proto, E \&\&e=0)
\item 
{\footnotesize template$<$typename E $>$ }\\\mbox{\hyperlink{classlo_1_1Server_a93a05e892f41d45d1069c77a15a2c16d}{Server}} (const string\+\_\+type \&group, const num\+\_\+string\+\_\+type \&port, const string\+\_\+type \&iface=0, const string\+\_\+type \&ip=0, E \&\&e=0)
\item 
\mbox{\hyperlink{classlo_1_1Server_a357459bdcea45875a1485b26e9bfcfaa}{Server}} (const num\+\_\+string\+\_\+type \&port, \mbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h=0)
\item 
\mbox{\hyperlink{classlo_1_1Server_a499a9175c5908a9947cc413316d7fb3d}{Server}} (const num\+\_\+string\+\_\+type \&port, int proto, \mbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h=0)
\item 
\mbox{\hyperlink{classlo_1_1Server_a260c1a07f5a0af5057ab97b8c0efe026}{Server}} (const string\+\_\+type \&group, const num\+\_\+string\+\_\+type \&port, const string\+\_\+type \&iface=\char`\"{}\char`\"{}, const string\+\_\+type \&ip=\char`\"{}\char`\"{}, \mbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}} err\+\_\+h=0)
\item 
virtual \mbox{\hyperlink{classlo_1_1Server_a207eee1c209e04d2fc683ecb8ce86470}{$\sim$\+Server}} ()
\item 
\mbox{\hyperlink{classlo_1_1Method}{Method}} \mbox{\hyperlink{classlo_1_1Server_aeea7b42e48809faf081c1b2bc3f2769c}{add\+\_\+method}} (const string\+\_\+type \&path, const string\+\_\+type \&types, \mbox{\hyperlink{lo__types_8h_a5b38e0822e47acaa3c7267348f50f66c}{lo\+\_\+method\+\_\+handler}} h, void $\ast$data) const
\item 
\mbox{\hyperlink{classlo_1_1Server_aadd89f1021f8437246bc640834ce7522}{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD}} ((const char $\ast$, const char $\ast$, \mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$, int),((char $\ast$) 0,(char $\ast$) 0,(\mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$) 0,(int) 0),(path, types, argv, argc))
\item 
\mbox{\hyperlink{classlo_1_1Server_a79293c21b7b389e32178d91f9774021f}{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD}} ((const char $\ast$, \mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$, int),((char $\ast$) 0,(\mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$) 0,(int) 0),(types, argv, argc))
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class representing a local O\+SC server, proxy for \mbox{\hyperlink{lo__types_8h_a59067bf50cf8abb4371da6f03c9036c9}{lo\+\_\+server}}. 

Definition at line 416 of file lo\+\_\+cpp.\+h.



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classlo_1_1Server_abf695f157836b714e1e250b47bc018b3}\label{classlo_1_1Server_abf695f157836b714e1e250b47bc018b3}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [1/7]}}
{\footnotesize\ttfamily lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{lo__types_8h_a59067bf50cf8abb4371da6f03c9036c9}{lo\+\_\+server}}}]{s }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor. 

Definition at line 420 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a65262c3e0bebd348fe07474dfee59150}\label{classlo_1_1Server_a65262c3e0bebd348fe07474dfee59150}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [2/7]}}
{\footnotesize\ttfamily template$<$typename E $>$ \\
lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{const num\+\_\+string\+\_\+type \&}]{port,  }\item[{E \&\&}]{e }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor taking an error handler. 

Definition at line 424 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a56985c15c0efa0c1d61ffb25bbdc47a3}\label{classlo_1_1Server_a56985c15c0efa0c1d61ffb25bbdc47a3}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [3/7]}}
{\footnotesize\ttfamily template$<$typename E $>$ \\
lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{const num\+\_\+string\+\_\+type \&}]{port,  }\item[{int}]{proto,  }\item[{E \&\&}]{e = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor taking a port number and error handler. 

Definition at line 440 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a93a05e892f41d45d1069c77a15a2c16d}\label{classlo_1_1Server_a93a05e892f41d45d1069c77a15a2c16d}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [4/7]}}
{\footnotesize\ttfamily template$<$typename E $>$ \\
lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{const string\+\_\+type \&}]{group,  }\item[{const num\+\_\+string\+\_\+type \&}]{port,  }\item[{const string\+\_\+type \&}]{iface = {\ttfamily 0},  }\item[{const string\+\_\+type \&}]{ip = {\ttfamily 0},  }\item[{E \&\&}]{e = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor taking a multicast group, port number, interface identifier or IP, and error handler. 

Definition at line 457 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a357459bdcea45875a1485b26e9bfcfaa}\label{classlo_1_1Server_a357459bdcea45875a1485b26e9bfcfaa}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [5/7]}}
{\footnotesize\ttfamily lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{const num\+\_\+string\+\_\+type \&}]{port,  }\item[{\mbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor taking a port number and error handler. 

Definition at line 479 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a499a9175c5908a9947cc413316d7fb3d}\label{classlo_1_1Server_a499a9175c5908a9947cc413316d7fb3d}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [6/7]}}
{\footnotesize\ttfamily lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{const num\+\_\+string\+\_\+type \&}]{port,  }\item[{int}]{proto,  }\item[{\mbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor taking a port number, protocol, and error handler. 

Definition at line 483 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a260c1a07f5a0af5057ab97b8c0efe026}\label{classlo_1_1Server_a260c1a07f5a0af5057ab97b8c0efe026}} 
\index{lo\+::\+Server@{lo\+::\+Server}!Server@{Server}}
\index{Server@{Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{Server()}{Server()}\hspace{0.1cm}{\footnotesize\ttfamily [7/7]}}
{\footnotesize\ttfamily lo\+::\+Server\+::\+Server (\begin{DoxyParamCaption}\item[{const string\+\_\+type \&}]{group,  }\item[{const num\+\_\+string\+\_\+type \&}]{port,  }\item[{const string\+\_\+type \&}]{iface = {\ttfamily \char`\"{}\char`\"{}},  }\item[{const string\+\_\+type \&}]{ip = {\ttfamily \char`\"{}\char`\"{}},  }\item[{\mbox{\hyperlink{lo__types_8h_aa4406d5e90db364c02337656e6c95250}{lo\+\_\+err\+\_\+handler}}}]{err\+\_\+h = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Constructor taking a multicast group, port number, interface identifier or IP, and error handler. 

Definition at line 488 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_a207eee1c209e04d2fc683ecb8ce86470}\label{classlo_1_1Server_a207eee1c209e04d2fc683ecb8ce86470}} 
\index{lo\+::\+Server@{lo\+::\+Server}!````~Server@{$\sim$\+Server}}
\index{````~Server@{$\sim$\+Server}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{$\sim$\+Server()}{~Server()}}
{\footnotesize\ttfamily virtual lo\+::\+Server\+::$\sim$\+Server (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

Destructor 

Definition at line 496 of file lo\+\_\+cpp.\+h.



References lo\+\_\+server\+\_\+free().



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classlo_1_1Server_aeea7b42e48809faf081c1b2bc3f2769c}\label{classlo_1_1Server_aeea7b42e48809faf081c1b2bc3f2769c}} 
\index{lo\+::\+Server@{lo\+::\+Server}!add\+\_\+method@{add\+\_\+method}}
\index{add\+\_\+method@{add\+\_\+method}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{add\+\_\+method()}{add\_method()}}
{\footnotesize\ttfamily \mbox{\hyperlink{classlo_1_1Method}{Method}} lo\+::\+Server\+::add\+\_\+method (\begin{DoxyParamCaption}\item[{const string\+\_\+type \&}]{path,  }\item[{const string\+\_\+type \&}]{types,  }\item[{\mbox{\hyperlink{lo__types_8h_a5b38e0822e47acaa3c7267348f50f66c}{lo\+\_\+method\+\_\+handler}}}]{h,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

Add a method to handle a given path and type, with a handler and user data pointer. 

Definition at line 505 of file lo\+\_\+cpp.\+h.

\mbox{\Hypertarget{classlo_1_1Server_aadd89f1021f8437246bc640834ce7522}\label{classlo_1_1Server_aadd89f1021f8437246bc640834ce7522}} 
\index{lo\+::\+Server@{lo\+::\+Server}!L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD@{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD}}
\index{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD@{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+O\+D()}{LO\_ADD\_METHOD()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily lo\+::\+Server\+::\+L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD (\begin{DoxyParamCaption}\item[{(const char $\ast$, const char $\ast$, \mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$, int)}]{,  }\item[{((char $\ast$) 0,(char $\ast$) 0,(\mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$) 0,(int) 0)}]{,  }\item[{(path, types, argv, argc)}]{ }\end{DoxyParamCaption})}

Add a method to handle a given path and type, with a handler taking (argv, argc), user data. \mbox{\Hypertarget{classlo_1_1Server_a79293c21b7b389e32178d91f9774021f}\label{classlo_1_1Server_a79293c21b7b389e32178d91f9774021f}} 
\index{lo\+::\+Server@{lo\+::\+Server}!L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD@{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD}}
\index{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD@{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD}!lo\+::\+Server@{lo\+::\+Server}}
\subsubsection{\texorpdfstring{L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+O\+D()}{LO\_ADD\_METHOD()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily lo\+::\+Server\+::\+L\+O\+\_\+\+A\+D\+D\+\_\+\+M\+E\+T\+H\+OD (\begin{DoxyParamCaption}\item[{(const char $\ast$, \mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$, int)}]{,  }\item[{((char $\ast$) 0,(\mbox{\hyperlink{unionlo__arg}{lo\+\_\+arg}} $\ast$$\ast$) 0,(int) 0)}]{,  }\item[{(types, argv, argc)}]{ }\end{DoxyParamCaption})}

Add a method to handle a given path and type, with a handler taking (types, argv, argc), user data. 