TUIO C++ Developer API
UdpSender.h
1 /*
2  TUIO C++ Library
3  Copyright (c) 2005-2017 Martin Kaltenbrunner <martin@tuio.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 3.0 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library.
17 */
18 
19 #ifndef INCLUDED_UDPSENDER_H
20 #define INCLUDED_UDPSENDER_H
21 
22 #include "OscSender.h"
23 #include "ip/UdpSocket.h"
24 
25 #define IP_MTU_SIZE 1500
26 #define MAX_UDP_SIZE 4096
27 #define MIN_UDP_SIZE 576
28 
29 namespace TUIO {
30 
37  class LIBDECL UdpSender : public OscSender {
38 
39  public:
40 
45  UdpSender();
46 
55  UdpSender(const char *host, int port);
64  UdpSender(const char *host, int port, int size);
65 
69  virtual ~UdpSender();
70 
78  bool sendOscPacket (osc::OutboundPacketStream *bundle);
79 
85  bool isConnected ();
86 
87  const char* tuio_type() { return "TUIO/UDP"; }
88 
89  private:
90  UdpTransmitSocket *socket;
91  };
92 }
93 #endif /* INCLUDED_UDPSENDER_H */
Definition: FlashSender.h:166
Definition: OscSender.h:37
Definition: UdpSender.h:37