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 33 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 28 of file PhysicalSocketOption.cpp.

31 , optValue(reinterpret_cast<char*>(&optValue), reinterpret_cast<char*>(&optValue) + sizeof(optValue)) {
32 }

References optLevel, optName, and PhysicalSocketOption().

Referenced by PhysicalSocketOption().

Here is the call graph for this function:
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 34 of file PhysicalSocketOption.cpp.

37 , optValue(optValue.begin(), optValue.end()) {
38 }

References optLevel, optName, and PhysicalSocketOption().

Referenced by PhysicalSocketOption().

Here is the call graph for this function:
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 40 of file PhysicalSocketOption.cpp.

44 }

References optLevel, optName, and PhysicalSocketOption().

Referenced by PhysicalSocketOption().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ getOptLen()

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

Definition at line 58 of file PhysicalSocketOption.cpp.

58 {
59 return static_cast<socklen_t>(optValue.size());
60 }

◆ getOptLevel()

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

Definition at line 46 of file PhysicalSocketOption.cpp.

46 {
47 return optLevel;
48 }

References optLevel.

◆ getOptName()

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

Definition at line 50 of file PhysicalSocketOption.cpp.

50 {
51 return optName;
52 }

References optName.

◆ getOptValue()

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

Definition at line 54 of file PhysicalSocketOption.cpp.

54 {
55 return static_cast<const void*>(optValue.data());
56 }

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

Definition at line 49 of file PhysicalSocketOption.h.


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