2 * Open Sound Control UDP server support
4 * Copyright (C) 2007-2009 Krzysztof Foltman
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __CALF_OSCTLSERV_H
23 #define __CALF_OSCTLSERV_H
31 struct osc_server
: public osc_socket
34 osc_message_dump
<osc_strstream
, std::ostream
> dump
;
35 osc_message_sink
<osc_strstream
> *sink
;
37 osc_server() : ioch(NULL
), dump(std::cout
), sink(&dump
) {}
39 virtual void on_bind();
41 static gboolean
on_data(GIOChannel
*channel
, GIOCondition cond
, void *obj
);
42 void parse_message(const char *buffer
, int len
);