The option in the socket

Source: Internet
Author: User

Set an option on the socket./*** this function was used to set a option on the socket.** @param option the new option Value to BES set on the socket.** @throws boost::system::system_error thrown on failure.** @sa settablesocketoption @n* Boo St::asio::socket_base::broadcast @n* boost::asio::socket_base::d o_not_route @n* Boost::asio::socket_base::keep_ Alive @n* Boost::asio::socket_base::linger @n* boost::asio::socket_base::receive_buffer_size @n* boost::asio::socket _base::receive_low_watermark @n* boost::asio::socket_base::reuse_address @n* boost::asio::socket_base::send_buffer _size @n* boost::asio::socket_base::send_low_watermark @n* boost::asio::ip::multicast::join_group @n* Boost::asio:: Ip::multicast::leave_group @n* boost::asio::ip::multicast::enable_loopback @n* boost::asio::ip::multicast::o Utbound_interface @n* boost::asio::ip::multicast::hops @n* boost::asio::ip::tcp::no_delay** @par Example* Setting the Ipproto_tcp/tcp_nodelay option:* @code * Boost::asio::ip::tcp::socket SockeT (io_service); *. * boost::asio::ip::tcp::no_delay option (TRUE); * socket.set_option (option); * @endcode */template <typename settablesocketoption>void set_option (const settablesocketoption& option) {Boost::system::error_ Code Ec;this->get_service (). Set_option (This->get_implementation (), option, EC) Boost::asio::d etail::throw_ Error (EC, "set_option");}

  

The option in the socket

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.