Public Member Functions | |
udp_server (boost::asio::io_service &io_service, ServiceList *_services, boost::mutex *_servicesmutex) | |
bool | open4 () |
bool | open6 () |
void | sendservice (Service service) |
Private Member Functions | |
void | start_receive_4 () |
void | start_receive_6 () |
void | handle_receive_4 (const boost::system::error_code &error, std::size_t bytes_transferred) |
void | handle_receive_6 (const boost::system::error_code &error, std::size_t bytes_transferred) |
void | handle_info (boost::array< char, 1500 > &buffer, std::size_t length) |
void | handle_send (boost::shared_ptr< std::string >, const boost::system::error_code &error, std::size_t) |
Private Attributes | |
udp::socket | socket_v4 |
udp::socket | socket_v6 |
udp::endpoint | remote_endpoint_ |
boost::array< char, 1500 > | recv_buffer_4 |
boost::array< char, 1500 > | recv_buffer_6 |
ServiceList * | services |
boost::mutex * | servicesmutex |
Definition at line 187 of file PeriodicBroadcast.h.
ariba::utility::PeriodicBroadcast::udp_server::udp_server | ( | boost::asio::io_service & | io_service, | |
ServiceList * | _services, | |||
boost::mutex * | _servicesmutex | |||
) | [inline] |
Definition at line 198 of file PeriodicBroadcast.h.
References open4(), open6(), start_receive_4(), and start_receive_6().
void ariba::utility::PeriodicBroadcast::udp_server::handle_info | ( | boost::array< char, 1500 > & | buffer, | |
std::size_t | length | |||
) | [inline, private] |
Definition at line 343 of file PeriodicBroadcast.h.
References data_deserialize(), ariba::utility::PeriodicBroadcastMessage::getInfo1(), ariba::utility::PeriodicBroadcastMessage::getInfo2(), ariba::utility::PeriodicBroadcastMessage::getInfo3(), ariba::utility::PeriodicBroadcastMessage::getName(), services, and servicesmutex.
Referenced by handle_receive_4(), and handle_receive_6().
void ariba::utility::PeriodicBroadcast::udp_server::handle_receive_4 | ( | const boost::system::error_code & | error, | |
std::size_t | bytes_transferred | |||
) | [inline, private] |
Definition at line 321 of file PeriodicBroadcast.h.
References handle_info(), logging_warn, recv_buffer_4, and start_receive_4().
Referenced by start_receive_4().
void ariba::utility::PeriodicBroadcast::udp_server::handle_receive_6 | ( | const boost::system::error_code & | error, | |
std::size_t | bytes_transferred | |||
) | [inline, private] |
Definition at line 332 of file PeriodicBroadcast.h.
References handle_info(), logging_warn, recv_buffer_6, and start_receive_6().
Referenced by start_receive_6().
void ariba::utility::PeriodicBroadcast::udp_server::handle_send | ( | boost::shared_ptr< std::string > | , | |
const boost::system::error_code & | error, | |||
std::size_t | ||||
) | [inline, private] |
Definition at line 370 of file PeriodicBroadcast.h.
References logging_warn.
bool ariba::utility::PeriodicBroadcast::udp_server::open4 | ( | ) | [inline] |
Definition at line 206 of file PeriodicBroadcast.h.
References logging_warn, ariba::utility::PeriodicBroadcast::serverport_v4, and socket_v4.
Referenced by udp_server().
bool ariba::utility::PeriodicBroadcast::udp_server::open6 | ( | ) | [inline] |
Definition at line 240 of file PeriodicBroadcast.h.
References logging_warn, ariba::utility::PeriodicBroadcast::serverport_v6, and socket_v6.
Referenced by udp_server().
void ariba::utility::PeriodicBroadcast::udp_server::sendservice | ( | Service | service | ) | [inline] |
Definition at line 274 of file PeriodicBroadcast.h.
References data_serialize(), DEFAULT_V, DataTpl< T, DataModel >::getBuffer(), ariba::utility::PeriodicBroadcast::Service::getInfo1(), ariba::utility::PeriodicBroadcast::Service::getInfo2(), ariba::utility::PeriodicBroadcast::Service::getInfo3(), DataTpl< T, DataModel >::getLength(), ariba::utility::PeriodicBroadcast::Service::getName(), logging_warn, ariba::utility::PeriodicBroadcast::serverport_v4, ariba::utility::PeriodicBroadcast::serverport_v6, ariba::utility::PeriodicBroadcastMessage::setInfo1(), ariba::utility::PeriodicBroadcastMessage::setInfo2(), ariba::utility::PeriodicBroadcastMessage::setInfo3(), ariba::utility::PeriodicBroadcastMessage::setName(), socket_v4, and socket_v6.
Referenced by ariba::utility::PeriodicBroadcast::sendLocalServices().
void ariba::utility::PeriodicBroadcast::udp_server::start_receive_4 | ( | ) | [inline, private] |
Definition at line 305 of file PeriodicBroadcast.h.
References handle_receive_4(), recv_buffer_4, remote_endpoint_, and socket_v4.
Referenced by handle_receive_4(), and udp_server().
void ariba::utility::PeriodicBroadcast::udp_server::start_receive_6 | ( | ) | [inline, private] |
Definition at line 313 of file PeriodicBroadcast.h.
References handle_receive_6(), recv_buffer_6, remote_endpoint_, and socket_v6.
Referenced by handle_receive_6(), and udp_server().
boost::array<char, 1500> ariba::utility::PeriodicBroadcast::udp_server::recv_buffer_4 [private] |
Definition at line 192 of file PeriodicBroadcast.h.
Referenced by handle_receive_4(), and start_receive_4().
boost::array<char, 1500> ariba::utility::PeriodicBroadcast::udp_server::recv_buffer_6 [private] |
Definition at line 193 of file PeriodicBroadcast.h.
Referenced by handle_receive_6(), and start_receive_6().
udp::endpoint ariba::utility::PeriodicBroadcast::udp_server::remote_endpoint_ [private] |
Definition at line 191 of file PeriodicBroadcast.h.
Referenced by start_receive_4(), and start_receive_6().
Definition at line 194 of file PeriodicBroadcast.h.
Referenced by handle_info().
boost::mutex* ariba::utility::PeriodicBroadcast::udp_server::servicesmutex [private] |
Definition at line 195 of file PeriodicBroadcast.h.
Referenced by handle_info().
udp::socket ariba::utility::PeriodicBroadcast::udp_server::socket_v4 [private] |
Definition at line 189 of file PeriodicBroadcast.h.
Referenced by open4(), sendservice(), and start_receive_4().
udp::socket ariba::utility::PeriodicBroadcast::udp_server::socket_v6 [private] |
Definition at line 190 of file PeriodicBroadcast.h.
Referenced by open6(), sendservice(), and start_receive_6().