| Home | Libraries | People | FAQ | More

# Socket_Option Class Reference

Inherited by Boolean_Socket_Option, Integer_Socket_Option, IP_MReq_Socket_Option, IP_Network_Interface_Socket_Option, and Linger_Socket_Option.

Inheritance diagram for Socket_Option:

List of all members.

## Detailed Description

Socket_Option concept.

Defines the interface that must be implemented by an object passed as the `option` parameter to:

- boost::asio::tcp::socket::get_option
- boost::asio::tcp::socket::set_option
- boost::asio::udp::socket::get_option
- boost::asio::udp::socket::set_option
- boost::asio::tcp::acceptor::get_option
- boost::asio::tcp::acceptor::set_option

Implemented By:
  boost::asio::socket_base::broadcast
  boost::asio::socket_base::do_not_route
  boost::asio::socket_base::keep_alive
  boost::asio::socket_base::linger
  boost::asio::socket_base::send_buffer_size
  boost::asio::socket_base::send_low_watermark
  boost::asio::socket_base::receive_buffer_size
  boost::asio::socket_base::receive_low_watermark
  boost::asio::socket_base::reuse_address
  boost::asio::ip::tcp::no_delay
  boost::asio::ip::multicast::join_group
  boost::asio::ip::multicast::leave_group
  boost::asio::ip::multicast::outbound_interface
  boost::asio::ip::multicast::hops
  boost::asio::ip::multicast::enable_loopback

## Public Member Functions

template<typename Protocol>
int | level (const Protocol &protocol) const
| Get the level of the socket option.
template<typename Protocol>
int | name (const Protocol &protocol) const
| Get the name of the socket option.
template<typename Protocol>
implementation_defined | data (const Protocol &protocol)
| Get a pointer to the socket option data.
template<typename Protocol>
implementation_defined | data (const Protocol &protocol) const
| Get a pointer to the socket option data.
template<typename Protocol>
std::size_t | size (const Protocol &protocol) const
| Get the size of the socket option data in bytes.

## Member Function Documentation

template<typename Protocol>

int Socket_Option::level | ( | const Protocol & | protocol | ) | const

Get the level of the socket option.

template<typename Protocol>

int Socket_Option::name | ( | const Protocol & | protocol | ) | const

Get the name of the socket option.

template<typename Protocol>

implementation_defined Socket_Option::data | ( | const Protocol & | protocol | ) |

Get a pointer to the socket option data.

template<typename Protocol>

implementation_defined Socket_Option::data | ( | const Protocol & | protocol | ) | const

Get a pointer to the socket option data.

template<typename Protocol>

std::size_t Socket_Option::size | ( | const Protocol & | protocol | ) | const

Get the size of the socket option data in bytes.

| Copyright © 2003 - 2006 Christopher M. Kohlhoff