TUIO C++ Developer API
TUIO::UdpSender Class Reference

#include <UdpSender.h>

Inheritance diagram for TUIO::UdpSender:
TUIO::OscSender

Public Member Functions

 UdpSender ()
 
 UdpSender (const char *host, int port)
 
 UdpSender (const char *host, int port, int size)
 
virtual ~UdpSender ()
 
bool sendOscPacket (osc::OutboundPacketStream *bundle)
 
bool isConnected ()
 
const char * tuio_type ()
 
- Public Member Functions inherited from TUIO::OscSender
 OscSender ()
 
virtual ~OscSender ()
 
bool isLocal ()
 
int getBufferSize ()
 

Additional Inherited Members

- Protected Attributes inherited from TUIO::OscSender
unsigned int buffer_size
 
bool local
 

Detailed Description

The UdpSender implements the UDP transport method for OSC

Author
Martin Kaltenbrunner
Version
1.1.6

Constructor & Destructor Documentation

◆ UdpSender() [1/3]

UdpSender::UdpSender ( )

The default constructor creates a UdpSender that sends to the default UDP port 3333 on localhost using the maximum packet size of 65536 bytes for single packets on the loopback device

◆ UdpSender() [2/3]

UdpSender::UdpSender ( const char *  host,
int  port 
)

This constructor creates a UdpSender that sends to the provided port on the the given host using the default MTU size of 1500 bytes to deliver unfragmented UDP packets on a LAN

Parameters
hostthe receiving host name
portthe outgoing UDP port number

◆ UdpSender() [3/3]

UdpSender::UdpSender ( const char *  host,
int  port,
int  size 
)

This constructor creates a UdpSender that sends to the provided port on the the given host the UDP packet size can be set to a value between 576 and 65536 bytes

Parameters
hostthe receiving host name
portthe outgoing UDP port number
sizethe maximum UDP packet size

◆ ~UdpSender()

UdpSender::~UdpSender ( )
virtual

The destructor closes the socket.

Member Function Documentation

◆ isConnected()

bool UdpSender::isConnected ( )
virtual

This method returns the connection state

Returns
true if the connection is alive

Implements TUIO::OscSender.

◆ sendOscPacket()

bool UdpSender::sendOscPacket ( osc::OutboundPacketStream *  bundle)
virtual

This method delivers the provided OSC data

Parameters
*bundlethe OSC stream to deliver
Returns
true if the data was delivered successfully

Implements TUIO::OscSender.


The documentation for this class was generated from the following files: