Changeset 4872 for source/ariba/utility
- Timestamp:
- Jul 13, 2009, 1:41:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h
r4866 r4872 125 125 public: 126 126 udp_server(boost::asio::io_service& io_service, ServiceList* _services, boost::mutex* _servicesmutex) 127 : socket_v4(io_service, udp::endpoint(udp::v4(), PeriodicBroadcast::serverport_v4)), 128 socket_v6(io_service, udp::endpoint(udp::v6(), PeriodicBroadcast::serverport_v6)), 129 services(_services), servicesmutex(_servicesmutex) { 130 131 boost::asio::socket_base::broadcast option(true); 132 socket_v4.set_option(option); 133 socket_v6.set_option(option); 127 : services(_services), servicesmutex(_servicesmutex), 128 socket_v4(io_service), socket_v6(io_service) { 129 130 boost::asio::ip::udp::endpoint listen_endpoint_v4( 131 boost::asio::ip::address_v4::broadcast(), 132 PeriodicBroadcast::serverport_v4); 133 134 boost::asio::ip::udp::endpoint listen_endpoint_v6( 135 boost::asio::ip::address_v6::from_string("ff02::1"), 136 PeriodicBroadcast::serverport_v6); 137 138 socket_v4.open( listen_endpoint_v4.protocol() ); 139 socket_v6.open( listen_endpoint_v6.protocol() ); 140 141 socket_v4.set_option( boost::asio::ip::udp::socket::reuse_address(true) ); 142 socket_v6.set_option( boost::asio::ip::udp::socket::reuse_address(true) ); 143 144 socket_v4.set_option( boost::asio::socket_base::broadcast(true) ); 145 socket_v6.set_option( boost::asio::socket_base::broadcast(true) ); 146 147 socket_v4.bind( listen_endpoint_v4 ); 148 //socket_v6.bind( listen_endpoint_v6 ); 134 149 135 150 start_receive();
Note:
See TracChangeset
for help on using the changeset viewer.