- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# SCS::UDPReceiver Class Reference

Receive UDP packets from IP address and port. The receiver is multicast aware. More...

`#include <udpreceiver.h>`

List of all members.

## Public Member Functions
| UDPReceiver (boost::function< void(void *, std::size_t)> function, boost::asio::io_service &io_service, const boost::asio::ip::address &address, short port)
| ~UDPReceiver ()

## Detailed Description

Receive UDP packets from IP address and port. The receiver is multicast aware.

If the address provided belongs to the IP multicast range, the multicast group is automatically joined, else it is handled as unicast.

Author:
  (c) 2009 by Philipp Münzel

Version:
  1.3

## Constructor & Destructor Documentation

SCS::UDPReceiver::UDPReceiver | ( | boost::function< void(void *, std::size_t)> | function,
|  | boost::asio::io_service & | io_service,
|  | const boost::asio::ip::address & | address,
|  | short | port
| ) |  |

Open a socket and listen asynchronously to incoming data.

Parameters:

  function | function to parse incoming data, takes a raw pointer to data and size in bytes
  io_service | a boost::asio::io_service to handle the asynchronous requests
  address | ip address struct
  port | port from which data is received

SCS::UDPReceiver::~UDPReceiver | ( |  | ) |

Stop receiving data and close connection.

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

- udpreceiver.h