live
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes
Socket Class Referenceabstract

#include <NetInterface.hh>

Inheritance diagram for Socket:
Inheritance graph
[legend]
Collaboration diagram for Socket:
Collaboration graph
[legend]

Public Member Functions

virtual ~Socket ()
 
void reset ()
 
virtual Boolean handleRead (unsigned char *buffer, unsigned bufferMaxSize, unsigned &bytesRead, struct sockaddr_storage &fromAddress)=0
 
int socketNum () const
 
Port port () const
 
UsageEnvironmentenv () const
 

Static Public Attributes

static int DebugLevel
 
static UsageEnvironmentDefaultUsageEnvironment
 

Protected Member Functions

 Socket (UsageEnvironment &env, Port port, int family)
 
Boolean changePort (Port newPort)
 

Private Attributes

int fSocketNum
 
UsageEnvironmentfEnv
 
Port fPort
 
int fFamily
 

Detailed Description

Definition at line 39 of file NetInterface.hh.

Constructor & Destructor Documentation

◆ ~Socket()

virtual Socket::~Socket ( )
virtual

◆ Socket()

Socket::Socket ( UsageEnvironment env,
Port  port,
int  family 
)
protected

Member Function Documentation

◆ changePort()

Boolean Socket::changePort ( Port  newPort)
protected

◆ env()

UsageEnvironment & Socket::env ( ) const
inline

Definition at line 55 of file NetInterface.hh.

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

References fEnv.

◆ handleRead()

virtual Boolean Socket::handleRead ( unsigned char *  buffer,
unsigned  bufferMaxSize,
unsigned &  bytesRead,
struct sockaddr_storage &  fromAddress 
)
pure virtual

Implemented in OutputSocket, and Groupsock.

◆ port()

Port Socket::port ( ) const
inline

Definition at line 51 of file NetInterface.hh.

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

References fPort.

◆ reset()

void Socket::reset ( )

◆ socketNum()

int Socket::socketNum ( ) const
inline

Definition at line 49 of file NetInterface.hh.

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

References fSocketNum.

Field Documentation

◆ DebugLevel

int Socket::DebugLevel
static

Definition at line 57 of file NetInterface.hh.

◆ DefaultUsageEnvironment

UsageEnvironment* NetInterface::DefaultUsageEnvironment
staticinherited

Definition at line 32 of file NetInterface.hh.

◆ fEnv

UsageEnvironment& Socket::fEnv
private

Definition at line 66 of file NetInterface.hh.

Referenced by env().

◆ fFamily

int Socket::fFamily
private

Definition at line 68 of file NetInterface.hh.

◆ fPort

Port Socket::fPort
private

Definition at line 67 of file NetInterface.hh.

Referenced by port().

◆ fSocketNum

int Socket::fSocketNum
private

Definition at line 65 of file NetInterface.hh.

Referenced by socketNum().


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