* Enable or disable UDP confirm mode. Disabled by default. If enabled every
* device handling the send packet shall report if the path was viable or not. This
* is useful for debugging but may negatively impact performance.
* @brief Enable or disable UDP confirm mode
* @param enabled If set to true the UDP confirm mode will be activated.
*/
voidenable_confirm_mode(boolenabled){
if(enabled){
this->send_flags|=MSG_CONFIRM;
}else{
this->send_flags&=~MSG_CONFIRM;
}
};
private:
inlineintget_io_read_state()const{
returnthis->_in_cb!=nullptr?::ev::READ:0;
}
/**
* This method implements the io queue callback. It is responsible for the actual data transactions
* @param w The io handle to use
* @param events The event flag container
*/
voidcb_ev(::ev::io&w,intevents){
if(events&::ev::ERROR){
thrownetio_exception("Error while decoding events from libev: state="+std::to_string(events)+", current_send_flags="+std::to_string(this->send_flags));