| Home | Libraries | People | FAQ | More

# Linger_Socket_Option Class Reference

Inherits Socket_Option.

Inheritance diagram for Linger_Socket_Option:

List of all members.

## Detailed Description

Linger_Socket_Option concept.

Implemented By:
  boost::asio::socket_base::linger

## Public Member Functions

| Linger_Socket_Option ()
| Default constructor initialises to disabled with a 0 timeout.
| Linger_Socket_Option (bool enabled, unsigned short timeout)
| Construct with specific option values.
void | enabled (bool value)
| Set the value for whether linger is enabled.
bool | enabled () const
| Get the value for whether linger is enabled.
void | timeout (unsigned short value)
| Set the value for the linger timeout in seconds.
unsigned short | timeout () const
| Get the value for the linger timeout in seconds.
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.

## Constructor & Destructor Documentation

Linger_Socket_Option::Linger_Socket_Option | ( |  | ) |

Default constructor initialises to disabled with a 0 timeout.

Linger_Socket_Option::Linger_Socket_Option | ( | bool | enabled,
|  | unsigned short | timeout |
| ) |  |  |

Construct with specific option values.

## Member Function Documentation

void Linger_Socket_Option::enabled | ( | bool | value | ) |

Set the value for whether linger is enabled.

bool Linger_Socket_Option::enabled | ( |  | ) | const

Get the value for whether linger is enabled.

void Linger_Socket_Option::timeout | ( | unsigned short | value | ) |

Set the value for the linger timeout in seconds.

unsigned short Linger_Socket_Option::timeout | ( |  | ) | const

Get the value for the linger timeout in seconds.

template<typename Protocol>

int Socket_Option::level | ( | const Protocol & | protocol | ) | const`[inherited]`

Get the level of the socket option.

template<typename Protocol>

int Socket_Option::name | ( | const Protocol & | protocol | ) | const`[inherited]`

Get the name of the socket option.

template<typename Protocol>

implementation_defined Socket_Option::data | ( | const Protocol & | protocol | ) | `[inherited]`

Get a pointer to the socket option data.

template<typename Protocol>

implementation_defined Socket_Option::data | ( | const Protocol & | protocol | ) | const`[inherited]`

Get a pointer to the socket option data.

template<typename Protocol>

std::size_t Socket_Option::size | ( | const Protocol & | protocol | ) | const`[inherited]`

Get the size of the socket option data in bytes.

| Copyright © 2003 - 2006 Christopher M. Kohlhoff