c++ - Getting the IP address of a received message in boost -


how can retrieve ip address boost when receive udp message(using boost::asio::ip::udp)?

thanks!

you can using

boost::asio::ip::udp::socket::async_receive_from()

or

boost::asio::ip::udp::socket::receive_from()

functions, have endpoint_type & sender_endpoint output parameter. returned endpoint can used resolve sender ip address.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -