Siena C++ API documentation (v. 0.4.3)

UDPReceiver Class Reference

#include <Comm.h>

Inheritance diagram for UDPReceiver:

Receiver List of all members.

Public Member Functions

 UDPReceiver (in_port_t port, const char *hostname=NULL, bool reuse=true)
virtual size_t receive (char *, size_t) throw (CommException)
virtual void shutdown ()
virtual string uri ()
virtual string & uri (string &)

Detailed Description

UDP-based receiver

this receiver uses a UDP port to receive packets. It creates a local UDP port, accepting packets from it.

Examples:

subscriber.cc.


Constructor & Destructor Documentation

UDPReceiver::UDPReceiver ( in_port_t  port,
const char *  hostname = NULL,
bool  reuse = true 
)

constructs a UDPReceiver

Parameters:
port port number
hostname externally visible name for this host. Although it is possible for this library to figure out a hostname, the default value is not 100% reliable, especially in cases in which the host uses dynamically-assigned IP addresses, or in the presence of several network interfaces.
reuse determines whether the given port number should be immediately re-used, if recently bound to another application.


Member Function Documentation

virtual size_t UDPReceiver::receive ( char *  ,
size_t   
) throw (CommException) [virtual]

receives a message

Exceptions:
CommException 

Implements Receiver.

virtual void UDPReceiver::shutdown (  )  [virtual]

closes this sender

Reimplemented from Receiver.

virtual string UDPReceiver::uri (  )  [virtual]

URI for this receiver

a URI is an external representation of the point of contact of this receiver. This URI can be used to create senders to contact this receiver.

Implements Receiver.

virtual string& UDPReceiver::uri ( string &   )  [virtual]

exernally visible URI for this receiver

a URI is an external representation of the point of contact of this receiver. This URI can be used to create senders to contact this receiver.

Implements Receiver.


The documentation for this class was generated from the following file:
Copyright © 2001 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga