Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes
OutputSocket Class Reference

#include <Groupsock.hh>

Inheritance diagram for OutputSocket:
Inheritance graph
Collaboration diagram for OutputSocket:
Collaboration graph

Public Member Functions

 OutputSocket (UsageEnvironment &env, int family)
virtual ~OutputSocket ()
virtual Boolean write (struct sockaddr_storage const &addressAndPort, u_int8_t ttl, unsigned char *buffer, unsigned bufferSize)
void reset ()
int socketNum () const
Port port () const
UsageEnvironmentenv () const

Static Public Attributes

static int DebugLevel
static UsageEnvironmentDefaultUsageEnvironment

Protected Member Functions

 OutputSocket (UsageEnvironment &env, Port port, int family)
portNumBits sourcePortNum () const
Boolean changePort (Port newPort)

Private Member Functions

virtual Boolean handleRead (unsigned char *buffer, unsigned bufferMaxSize, unsigned &bytesRead, struct sockaddr_storage &fromAddressAndPort)

Private Attributes

Port fSourcePort
unsigned fLastSentTTL

Detailed Description

Definition at line 39 of file Groupsock.hh.

Constructor & Destructor Documentation

◆ OutputSocket() [1/2]

OutputSocket::OutputSocket ( UsageEnvironment env,
int  family 

◆ ~OutputSocket()

virtual OutputSocket::~OutputSocket ( )

◆ OutputSocket() [2/2]

OutputSocket::OutputSocket ( UsageEnvironment env,
Port  port,
int  family 

Member Function Documentation

◆ changePort()

Boolean Socket::changePort ( Port  newPort)

◆ env()

UsageEnvironment& Socket::env ( ) const

Definition at line 55 of file NetInterface.hh.

55 { return fEnv; }
UsageEnvironment & fEnv
Definition: NetInterface.hh:66

References Socket::fEnv.

◆ handleRead()

virtual Boolean OutputSocket::handleRead ( unsigned char *  buffer,
unsigned  bufferMaxSize,
unsigned &  bytesRead,
struct sockaddr_storage &  fromAddressAndPort 

Implements Socket.

Reimplemented in Groupsock.

◆ port()

Port Socket::port ( ) const

Definition at line 51 of file NetInterface.hh.

51  {
52  return fPort;
53  }
Port fPort
Definition: NetInterface.hh:67

References Socket::fPort.

◆ reset()

void Socket::reset ( )

◆ socketNum()

int Socket::socketNum ( ) const

Definition at line 49 of file NetInterface.hh.

49 { return fSocketNum; }
int fSocketNum
Definition: NetInterface.hh:65

References Socket::fSocketNum.

◆ sourcePortNum()

portNumBits OutputSocket::sourcePortNum ( ) const

Definition at line 50 of file Groupsock.hh.

50 {return fSourcePort.num();}
Port fSourcePort
Definition: Groupsock.hh:58
portNumBits num() const
Definition: NetAddress.hh:108

References fSourcePort, and Port::num().

◆ write()

virtual Boolean OutputSocket::write ( struct sockaddr_storage const &  addressAndPort,
u_int8_t  ttl,
unsigned char *  buffer,
unsigned  bufferSize 

Field Documentation

◆ DebugLevel

int Socket::DebugLevel

Definition at line 57 of file NetInterface.hh.

◆ DefaultUsageEnvironment

UsageEnvironment* NetInterface::DefaultUsageEnvironment

Definition at line 32 of file NetInterface.hh.

◆ fLastSentTTL

unsigned OutputSocket::fLastSentTTL

Definition at line 59 of file Groupsock.hh.

◆ fSourcePort

Port OutputSocket::fSourcePort

Definition at line 58 of file Groupsock.hh.

Referenced by sourcePortNum().

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