Class NetioUnbufferedReceiver
Defined in File netio_unbuffered_receiver.hpp
Inheritance Relationships
Base Type
public Receiver
(Class Receiver)
Class Documentation
-
class NetioUnbufferedReceiver : public Receiver
Public Functions
-
explicit NetioUnbufferedReceiver(const std::string &ip, uint32_t port, Bus &bus, unsigned int netio_pn, unsigned int netio_ps)
-
explicit NetioUnbufferedReceiver(const std::string &ip, uint32_t port, Bus &bus, unsigned int netio_pn, unsigned int netio_ps, NetioEventLoop &evloop)
-
~NetioUnbufferedReceiver()
-
virtual bool declare(const std::vector<Elink> &elinks) override
advertise e-links services by the receiver.
- Parameters:
elinks -- to advertise.
- Returns:
whether the operation was succesfull.
-
inline virtual void set_conn_open_callback(OnConnOpen callback) override
application callback for new connections.
- Parameters:
callback -- the std::function<void (std::string &)> to invoked when a new connection is established.
-
inline virtual void set_conn_close_callback(OnConnClose callback) override
application callback for closed connections.
- Parameters:
callback -- the std::function<void (std::string &)> to be invoked when a new connection is closed.
-
inline virtual void set_on_msg_callback(OnMsg callback) override
application callback for received messages.
- Parameters:
callback -- the std::function<void(uint8_t*, size_t)> to invoke when a message is received.
-
explicit NetioUnbufferedReceiver(const std::string &ip, uint32_t port, Bus &bus, unsigned int netio_pn, unsigned int netio_ps)