fastcom  1.0
Communication between applications made easy
Public Member Functions | List of all members
fastcom::Subscriber< DataType_ > Class Template Reference

Class to subscribe to information. More...

#include <Subscriber.h>

Public Member Functions

 Subscriber (std::string _ip, int _port)
 
 Subscriber (int _port)
 
void attachCallback (std::function< void(DataType_ &)> _callback)
 Attach a callback to a subscription. Each time data arrives the attached callback are called.
 

Detailed Description

template<typename DataType_>
class fastcom::Subscriber< DataType_ >

Class to subscribe to information.

Constructor & Destructor Documentation

template<typename DataType_ >
fastcom::Subscriber< DataType_ >::Subscriber ( std::string  _ip,
int  _port 
)

Constructor that prepares the subsciption.

Parameters
_ipip where the publisher is located
_portspecific port in the IP to be binded
template<typename DataType_ >
fastcom::Subscriber< DataType_ >::Subscriber ( int  _port)

Constructor that prepares the subsciption. This constructor assumes that the publisher is in the same computer.

Parameters
_portspecific port in the IP to be binded

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