fastcom
1.0
Communication between applications made easy
|
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. | |
Class to subscribe to information.
fastcom::Subscriber< DataType_ >::Subscriber | ( | std::string | _ip, |
int | _port | ||
) |
Constructor that prepares the subsciption.
_ip | ip where the publisher is located |
_port | specific port in the IP to be binded |
fastcom::Subscriber< DataType_ >::Subscriber | ( | int | _port | ) |
Constructor that prepares the subsciption. This constructor assumes that the publisher is in the same computer.
_port | specific port in the IP to be binded |