proxygen
folly::AsyncSocket::OptionKey Class Reference

#include <AsyncSocket.h>

Public Member Functions

bool operator< (const OptionKey &other) const
 
int apply (int fd, int val) const
 

Public Attributes

int level
 
int optname
 

Detailed Description

Uniquely identifies a handle to a socket option value. Each combination of level and option name corresponds to one socket option value.

Definition at line 360 of file AsyncSocket.h.

Member Function Documentation

int folly::AsyncSocket::OptionKey::apply ( int  fd,
int  val 
) const
inline

Definition at line 368 of file AsyncSocket.h.

References folly::netops::setsockopt().

Referenced by TEST(), and folly::ExpectWriteErrorCallback::~ExpectWriteErrorCallback().

368  {
369  return setsockopt(fd, level, optname, &val, sizeof(val));
370  }
int setsockopt(NetworkSocket s, int level, int optname, const void *optval, socklen_t optlen)
Definition: NetOps.cpp:384
double val
Definition: String.cpp:273
bool folly::AsyncSocket::OptionKey::operator< ( const OptionKey other) const
inline

Definition at line 362 of file AsyncSocket.h.

References level, and optname.

362  {
363  if (level == other.level) {
364  return optname < other.optname;
365  }
366  return level < other.level;
367  }

Member Data Documentation

int folly::AsyncSocket::OptionKey::level

Definition at line 371 of file AsyncSocket.h.

Referenced by operator<().

int folly::AsyncSocket::OptionKey::optname

Definition at line 372 of file AsyncSocket.h.

Referenced by operator<().


The documentation for this class was generated from the following file: