1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-19 01:09:58 +00:00

enable non-blocking mode for UDP sockets

This commit is contained in:
Vort 2024-02-28 18:55:28 +02:00
parent ca45fe73e9
commit aa1de7fe94

View File

@ -258,6 +258,7 @@ namespace transport
socket.set_option (boost::asio::ip::v6_only (true)); socket.set_option (boost::asio::ip::v6_only (true));
socket.set_option (boost::asio::socket_base::receive_buffer_size (SSU2_SOCKET_RECEIVE_BUFFER_SIZE)); socket.set_option (boost::asio::socket_base::receive_buffer_size (SSU2_SOCKET_RECEIVE_BUFFER_SIZE));
socket.set_option (boost::asio::socket_base::send_buffer_size (SSU2_SOCKET_SEND_BUFFER_SIZE)); socket.set_option (boost::asio::socket_base::send_buffer_size (SSU2_SOCKET_SEND_BUFFER_SIZE));
socket.non_blocking (true);
} }
catch (std::exception& ex ) catch (std::exception& ex )
{ {