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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -