\doxysection{example\+\_\+client.\+c}
\hypertarget{example__client_8c_source}{}\label{example__client_8c_source}\index{example\_client.c@{example\_client.c}}

\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00001}00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00002}00002\ \textcolor{comment}{\ *\ \ Copyright\ (C)\ 2014\ Steve\ Harris\ et\ al.\ (see\ AUTHORS)}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00003}00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00004}00004\ \textcolor{comment}{\ *\ \ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ modify}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00005}00005\ \textcolor{comment}{\ *\ \ it\ under\ the\ terms\ of\ the\ GNU\ Lesser\ General\ Public\ License\ as}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00006}00006\ \textcolor{comment}{\ *\ \ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2.1\ of\ the}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00007}00007\ \textcolor{comment}{\ *\ \ License,\ or\ (at\ your\ option)\ any\ later\ version.}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00008}00008\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00009}00009\ \textcolor{comment}{\ *\ \ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00010}00010\ \textcolor{comment}{\ *\ \ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00011}00011\ \textcolor{comment}{\ *\ \ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00012}00012\ \textcolor{comment}{\ *\ \ GNU\ Lesser\ General\ Public\ License\ for\ more\ details.}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00013}00013\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00014}00014\ \textcolor{comment}{\ *\ \ \$Id\$}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00015}00015\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00016}00016\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00017}00017\ \textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00018}00018\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00019}00019\ \textcolor{preprocessor}{\#ifndef\ WIN32}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00020}00020\ \textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00021}00021\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}\doxymbox{\hyperlink{lo_8h}{lo/lo.h}}"{}}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00023}00023\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00024}00024\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ testdata[6]\ =\ \textcolor{stringliteral}{"{}ABCDE"{}};}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00025}00025\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00026}00026\ \textcolor{keywordtype}{int}\ main(\textcolor{keywordtype}{int}\ argc,\ \textcolor{keywordtype}{char}\ *argv[])}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00027}00027\ \{}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00028}00028\ \ \ \ \ \textcolor{comment}{/*\ build\ a\ blob\ object\ from\ some\ data\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00029}00029\ \ \ \ \ \doxymbox{\hyperlink{lo__types_8h_a8f2b43f1b0709fab80bedc5a63f277f2}{lo\_blob}}\ btest\ =\ \doxymbox{\hyperlink{group__liblo_gaffb2348c70cb0e1214fd50bdc7574c39}{lo\_blob\_new}}(\textcolor{keyword}{sizeof}(testdata),\ testdata);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00030}00030\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00031}00031\ \ \ \ \ \textcolor{comment}{/*\ an\ address\ to\ send\ messages\ to.\ sometimes\ it\ is\ better\ to\ let\ the\ server}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00032}00032\ \textcolor{comment}{\ \ \ \ \ *\ pick\ a\ port\ number\ for\ you\ by\ passing\ NULL\ as\ the\ last\ argument\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00033}00033\ \textcolor{comment}{//\ \ \ \ lo\_address\ t\ =\ lo\_address\_new\_from\_url(\ "{}osc.unix://localhost/tmp/mysocket"{}\ );}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00034}00034\ \ \ \ \ \doxymbox{\hyperlink{lo__types_8h_a463f77a169c38213c73c9622821dcd0d}{lo\_address}}\ t\ =\ \doxymbox{\hyperlink{group__liblo_gae5af61a02ab08871d3ea070c8f770cfe}{lo\_address\_new}}(NULL,\ \textcolor{stringliteral}{"{}7770"{}});}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00035}00035\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00036}00036\ \ \ \ \ \textcolor{keywordflow}{if}\ (argc\ >\ 1\ \&\&\ argv[1][0]\ ==\ \textcolor{charliteral}{'-\/'}\ \&\&\ argv[1][1]\ ==\ \textcolor{charliteral}{'q'})\ \{}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00037}00037\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ message\ with\ no\ arguments\ to\ the\ path\ /quit\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00038}00038\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/quit"{}},\ NULL)\ ==\ -\/1)\ \{}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00039}00039\ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}OSC\ error\ \%d:\ \%s\(\backslash\)n"{}},\ \doxymbox{\hyperlink{group__liblo_ga407e1694a2ec58ee5b90c6390e0a5d53}{lo\_address\_errno}}(t),}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00040}00040\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafc6f04654d86ee1ddcce471a180392bf}{lo\_address\_errstr}}(t));}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00041}00041\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00042}00042\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00043}00043\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ message\ to\ /foo/bar\ with\ two\ float\ arguments,\ report\ any}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00044}00044\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ errors\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00045}00045\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/foo/bar"{}},\ \textcolor{stringliteral}{"{}ff"{}},\ 0.12345678f,\ 23.0f)\ ==\ -\/1)\ \{}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00046}00046\ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}OSC\ error\ \%d:\ \%s\(\backslash\)n"{}},\ \doxymbox{\hyperlink{group__liblo_ga407e1694a2ec58ee5b90c6390e0a5d53}{lo\_address\_errno}}(t),}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00047}00047\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafc6f04654d86ee1ddcce471a180392bf}{lo\_address\_errstr}}(t));}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00048}00048\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00049}00049\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00050}00050\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ pattern\ message\ to\ /foo/bar\ handler;\ note\ that}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00051}00051\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ pattern\ messages\ will\ be\ dispatched\ by\ all\ matching}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00052}00052\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ handlers,\ so\ the\ generic\ handler\ will\ also\ trigger.\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00053}00053\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/f*/bar"{}},\ \textcolor{stringliteral}{"{}ff"{}},\ 0.12345678f,\ 34.0f);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00054}00054\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00055}00055\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ pattern\ message\ to\ /foo/bar\ handler\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00056}00056\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/foo/b*"{}},\ \textcolor{stringliteral}{"{}ff"{}},\ 0.12345678f,\ 56.0f);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00057}00057\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00058}00058\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ pattern\ message\ to\ /foo/bar\ handler\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00059}00059\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/f*"{}},\ \textcolor{stringliteral}{"{}ff"{}},\ 0.12345678f,\ 78.0f);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00060}00060\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00061}00061\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ message\ to\ /a/b/c/d\ with\ a\ mixtrure\ of\ float\ and\ string}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00062}00062\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ arguments\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00063}00063\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/a/b/c/d"{}},\ \textcolor{stringliteral}{"{}sfsff"{}},\ \textcolor{stringliteral}{"{}one"{}},\ 0.12345678f,\ \textcolor{stringliteral}{"{}three"{}},}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00064}00064\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -\/0.00000023001f,\ 1.0);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00065}00065\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00066}00066\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ 'blob'\ object\ to\ /a/b/c/d\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00067}00067\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/a/b/c/d"{}},\ \textcolor{stringliteral}{"{}b"{}},\ btest);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00068}00068\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00069}00069\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ 'blob'\ object\ to\ /blobtest\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00070}00070\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/blobtest"{}},\ \textcolor{stringliteral}{"{}b"{}},\ btest);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00071}00071\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00072}00072\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ message\ to\ test\ method\ dispatch\ pattern\ matching\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00073}00073\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/patterntest"{}},\ \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00074}00074\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00075}00075\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ send\ a\ jamin\ scene\ change\ instruction\ with\ a\ 32bit\ integer\ argument\ */}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00076}00076\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__liblo_gafa4253874f97c2c16254ac57d2b7c987}{lo\_send}}(t,\ \textcolor{stringliteral}{"{}/jamin/scene"{}},\ \textcolor{stringliteral}{"{}i"{}},\ 2);}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00077}00077\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00078}00078\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00079}00079\ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00080}00080\ \}}
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00081}00081\ }
\DoxyCodeLine{\Hypertarget{example__client_8c_source_l00082}00082\ \textcolor{comment}{/*\ vi:set\ ts=8\ sts=4\ sw=4:\ */}}

\end{DoxyCode}
