SNode.C
Loading...
Searching...
No Matches
net::phy::PhysicalSocketOption Class Reference

#include <PhysicalSocketOption.h>

Collaboration diagram for net::phy::PhysicalSocketOption:

Public Member Functions

 PhysicalSocketOption ()=default
 
 PhysicalSocketOption (int optLevel, int optName, int optValue)
 
 PhysicalSocketOption (int optLevel, int optName, const std::string &optValue)
 
 PhysicalSocketOption (int optLevel, int optName, const std::vector< char > &optValue)
 
int getOptLevel () const
 
int getOptName () const
 
const void * getOptValue () const
 
socklen_t getOptLen () const
 

Private Attributes

int optLevel = -1
 
int optName = -1
 
std::vector< char > optValue
 

Detailed Description

Definition at line 55 of file PhysicalSocketOption.h.

Constructor & Destructor Documentation

◆ PhysicalSocketOption() [1/4]

net::phy::PhysicalSocketOption::PhysicalSocketOption ( )
default

◆ PhysicalSocketOption() [2/4]

net::phy::PhysicalSocketOption::PhysicalSocketOption ( int  optLevel,
int  optName,
int  optValue 
)

Definition at line 50 of file PhysicalSocketOption.cpp.

53 , optValue(reinterpret_cast<char*>(&optValue), reinterpret_cast<char*>(&optValue) + sizeof(optValue)) {
54 }

References optLevel, optName, and optValue.

Referenced by net::config::ConfigPhysicalSocket::addSocketOption(), and net::config::ConfigPhysicalSocket::addSocketOption().

Here is the caller graph for this function:

◆ PhysicalSocketOption() [3/4]

net::phy::PhysicalSocketOption::PhysicalSocketOption ( int  optLevel,
int  optName,
const std::string &  optValue 
)

Definition at line 56 of file PhysicalSocketOption.cpp.

59 , optValue(optValue.begin(), optValue.end()) {
60 }

References optLevel, optName, and optValue.

Referenced by net::config::ConfigPhysicalSocket::addSocketOption().

Here is the caller graph for this function:

◆ PhysicalSocketOption() [4/4]

net::phy::PhysicalSocketOption::PhysicalSocketOption ( int  optLevel,
int  optName,
const std::vector< char > &  optValue 
)

Definition at line 62 of file PhysicalSocketOption.cpp.

66 }

References optLevel, optName, and optValue.

Referenced by net::config::ConfigPhysicalSocket::addSocketOption().

Here is the caller graph for this function:

Member Function Documentation

◆ getOptLen()

socklen_t net::phy::PhysicalSocketOption::getOptLen ( ) const

Definition at line 80 of file PhysicalSocketOption.cpp.

80 {
81 return static_cast<socklen_t>(optValue.size());
82 }

References optValue.

Referenced by net::phy::PhysicalSocket< SocketAddressT >::open().

Here is the caller graph for this function:

◆ getOptLevel()

int net::phy::PhysicalSocketOption::getOptLevel ( ) const

Definition at line 68 of file PhysicalSocketOption.cpp.

68 {
69 return optLevel;
70 }

References optLevel.

Referenced by net::phy::PhysicalSocket< SocketAddressT >::open().

Here is the caller graph for this function:

◆ getOptName()

int net::phy::PhysicalSocketOption::getOptName ( ) const

Definition at line 72 of file PhysicalSocketOption.cpp.

72 {
73 return optName;
74 }

References optName.

Referenced by net::phy::PhysicalSocket< SocketAddressT >::open().

Here is the caller graph for this function:

◆ getOptValue()

const void * net::phy::PhysicalSocketOption::getOptValue ( ) const

Definition at line 76 of file PhysicalSocketOption.cpp.

76 {
77 return static_cast<const void*>(optValue.data());
78 }

References optValue.

Referenced by net::phy::PhysicalSocket< SocketAddressT >::open().

Here is the caller graph for this function:

Member Data Documentation

◆ optLevel

int net::phy::PhysicalSocketOption::optLevel = -1
private

◆ optName

int net::phy::PhysicalSocketOption::optName = -1
private

◆ optValue

std::vector<char> net::phy::PhysicalSocketOption::optValue
private

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