bes Updated for version 3.20.13
Socket Class Referenceabstract
Collaboration diagram for Socket:
Collaboration graph

Public Member Functions

virtual bool allowConnection ()=0
 
virtual void close ()
 
virtual void connect ()=0
 
virtual void dump (std::ostream &strm) const
 dumps information about this object
 
std::string getIp ()
 
unsigned int getPort ()
 
virtual unsigned int getRecvBufferSize ()=0
 
virtual unsigned int getSendBufferSize ()=0
 
virtual int getSocketDescriptor ()
 
virtual bool isConnected ()
 
virtual bool isListening ()
 
virtual void listen ()=0
 
virtual SocketnewSocket (int socket, struct sockaddr *addr)=0
 
virtual int receive (char *inBuff, const int inSize)
 
virtual void send (const std::string &str, int start, int end)
 
 Socket (int socket, struct sockaddr *addr)
 

Protected Attributes

bool _addr_set
 
bool _connected
 
std::string _ip
 
bool _listening
 
unsigned int _port
 
int _socket
 

Detailed Description

Definition at line 42 of file Socket.h.

Constructor & Destructor Documentation

◆ Socket() [1/2]

Socket::Socket ( )
inline

Definition at line 51 of file Socket.h.

◆ Socket() [2/2]

Socket::Socket ( int  socket,
struct sockaddr *  addr 
)

Definition at line 55 of file Socket.cc.

◆ ~Socket()

virtual Socket::~Socket ( )
inlinevirtual

Definition at line 58 of file Socket.h.

Member Function Documentation

◆ allowConnection()

virtual bool Socket::allowConnection ( )
pure virtual

Implemented in TcpSocket, and UnixSocket.

◆ close()

void Socket::close ( )
virtual

Definition at line 79 of file Socket.cc.

◆ dump()

void Socket::dump ( std::ostream &  strm) const
virtual

dumps information about this object

Displays the pointer value of this instance

Parameters
strmC++ i/o stream to dump the information to

Implements BESObj.

Reimplemented in TcpSocket, and UnixSocket.

Definition at line 137 of file Socket.cc.

◆ getIp()

std::string Socket::getIp ( )
inline

Definition at line 89 of file Socket.h.

◆ getPort()

unsigned int Socket::getPort ( )
inline

Definition at line 85 of file Socket.h.

◆ getRecvBufferSize()

virtual unsigned int Socket::getRecvBufferSize ( )
pure virtual

Implemented in TcpSocket.

◆ getSendBufferSize()

virtual unsigned int Socket::getSendBufferSize ( )
pure virtual

Implemented in TcpSocket.

◆ getSocketDescriptor()

virtual int Socket::getSocketDescriptor ( )
inlinevirtual

Definition at line 81 of file Socket.h.

◆ isConnected()

virtual bool Socket::isConnected ( )
inlinevirtual

Definition at line 64 of file Socket.h.

◆ isListening()

virtual bool Socket::isListening ( )
inlinevirtual

Definition at line 69 of file Socket.h.

◆ receive()

int Socket::receive ( char *  inBuff,
const int  inSize 
)
virtual

Definition at line 101 of file Socket.cc.

◆ send()

void Socket::send ( const std::string &  str,
int  start,
int  end 
)
virtual

Definition at line 89 of file Socket.cc.

Member Data Documentation

◆ _addr_set

bool Socket::_addr_set
protected

Definition at line 49 of file Socket.h.

◆ _connected

bool Socket::_connected
protected

Definition at line 45 of file Socket.h.

◆ _ip

std::string Socket::_ip
protected

Definition at line 47 of file Socket.h.

◆ _listening

bool Socket::_listening
protected

Definition at line 46 of file Socket.h.

◆ _port

unsigned int Socket::_port
protected

Definition at line 48 of file Socket.h.

◆ _socket

int Socket::_socket
protected

Definition at line 44 of file Socket.h.


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