OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
UnixSocket Class Reference

#include <UnixSocket.h>

Inheritance diagram for UnixSocket:
Inheritance graph
Collaboration diagram for UnixSocket:
Collaboration graph

Public Member Functions

virtual bool allowConnection ()
 is there any wrapper code for unix sockets More...
 
virtual void close ()
 
virtual void connect ()
 
virtual void dump (ostream &strm) const
 dumps information about this object More...
 
string getIp ()
 
unsigned int getPort ()
 
virtual unsigned int getRecvBufferSize ()
 
virtual unsigned int getSendBufferSize ()
 
virtual int getSocketDescriptor ()
 
virtual bool isConnected ()
 
virtual bool isListening ()
 
virtual void listen ()
 
virtual SocketnewSocket (int socket, struct sockaddr *addr)
 
virtual int receive (char *inBuff, const int inSize)
 
virtual void send (const string &str, int start, int end)
 
virtual void sync ()
 
 UnixSocket (const string &unixSocket)
 
 UnixSocket (int socket, struct sockaddr *addr)
 
virtual ~UnixSocket ()
 

Protected Attributes

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

Detailed Description

Definition at line 44 of file UnixSocket.h.

Constructor & Destructor Documentation

◆ UnixSocket() [1/2]

UnixSocket::UnixSocket ( const string &  unixSocket)
inline

Definition at line 50 of file UnixSocket.h.

Referenced by newSocket().

◆ UnixSocket() [2/2]

UnixSocket::UnixSocket ( int  socket,
struct sockaddr *  addr 
)
inline

Definition at line 53 of file UnixSocket.h.

◆ ~UnixSocket()

virtual UnixSocket::~UnixSocket ( )
inlinevirtual

Definition at line 58 of file UnixSocket.h.

References close(), connect(), and listen().

Here is the call graph for this function:

Member Function Documentation

◆ allowConnection()

bool UnixSocket::allowConnection ( )
virtual

is there any wrapper code for unix sockets

Implements Socket.

Definition at line 255 of file UnixSocket.cc.

Referenced by newSocket().

◆ close()

void UnixSocket::close ( )
virtual

Reimplemented from Socket.

Definition at line 230 of file UnixSocket.cc.

References Socket::_connected, Socket::_listening, and Socket::close().

Referenced by connect(), ServerApp::terminate(), and ~UnixSocket().

Here is the call graph for this function:

◆ connect()

void UnixSocket::connect ( )
virtual

Implements Socket.

Definition at line 48 of file UnixSocket.cc.

References Socket::_connected, Socket::_listening, Socket::_socket, close(), and SocketUtilities::create_temp_name().

Referenced by ~UnixSocket().

Here is the call graph for this function:

◆ dump()

void UnixSocket::dump ( 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

Reimplemented from Socket.

Definition at line 267 of file UnixSocket.cc.

References Socket::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Referenced by ServerApp::dump(), and newSocket().

Here is the call graph for this function:

◆ getIp()

string Socket::getIp ( )
inlineinherited

Definition at line 78 of file Socket.h.

References Socket::_ip, Socket::allowConnection(), Socket::dump(), Socket::getRecvBufferSize(), Socket::getSendBufferSize(), and Socket::newSocket().

Referenced by BESServerHandler::handle().

Here is the call graph for this function:

◆ getPort()

unsigned int Socket::getPort ( )
inlineinherited

Definition at line 74 of file Socket.h.

References Socket::_port.

Referenced by BESServerHandler::handle().

◆ getRecvBufferSize()

virtual unsigned int UnixSocket::getRecvBufferSize ( )
inlinevirtual

Implements Socket.

Definition at line 63 of file UnixSocket.h.

References UNIX_SOCKET_BUFFER_SIZE.

◆ getSendBufferSize()

virtual unsigned int UnixSocket::getSendBufferSize ( )
inlinevirtual

Implements Socket.

Definition at line 67 of file UnixSocket.h.

References UNIX_SOCKET_BUFFER_SIZE.

◆ getSocketDescriptor()

virtual int Socket::getSocketDescriptor ( )
inlinevirtualinherited

◆ isConnected()

virtual bool Socket::isConnected ( )
inlinevirtualinherited

Definition at line 63 of file Socket.h.

References Socket::_connected, and Socket::listen().

Referenced by Connection::isConnected(), SocketListener::listen(), and PPTClient::PPTClient().

Here is the call graph for this function:

◆ isListening()

virtual bool Socket::isListening ( )
inlinevirtualinherited

Definition at line 65 of file Socket.h.

References Socket::_listening, Socket::close(), Socket::receive(), Socket::send(), and Socket::sync().

Referenced by SocketListener::listen().

Here is the call graph for this function:

◆ listen()

void UnixSocket::listen ( )
virtual

Implements Socket.

Definition at line 155 of file UnixSocket.cc.

References Socket::_connected, Socket::_listening, and Socket::_socket.

Referenced by ~UnixSocket().

◆ newSocket()

virtual Socket* UnixSocket::newSocket ( int  socket,
struct sockaddr *  addr 
)
inlinevirtual

Implements Socket.

Definition at line 72 of file UnixSocket.h.

References allowConnection(), dump(), and UnixSocket().

Here is the call graph for this function:

◆ receive()

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

Definition at line 108 of file Socket.cc.

References Socket::_socket.

Referenced by PPTServer::closeConnection(), Socket::isListening(), and PPTConnection::send().

◆ send()

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

Definition at line 93 of file Socket.cc.

References Socket::_socket.

Referenced by Socket::isListening(), and PPTConnection::send().

◆ sync()

void Socket::sync ( )
virtualinherited

Definition at line 124 of file Socket.cc.

References Socket::_socket.

Referenced by Socket::isListening(), and PPTConnection::send().

Member Data Documentation

◆ _addr_set

bool Socket::_addr_set
protectedinherited

Definition at line 52 of file Socket.h.

Referenced by Socket::dump().

◆ _connected

bool Socket::_connected
protectedinherited

◆ _ip

string Socket::_ip
protectedinherited

Definition at line 50 of file Socket.h.

Referenced by Socket::dump(), Socket::getIp(), and Socket::Socket().

◆ _listening

bool Socket::_listening
protectedinherited

◆ _port

unsigned int Socket::_port
protectedinherited

Definition at line 51 of file Socket.h.

Referenced by Socket::dump(), Socket::getPort(), and Socket::Socket().

◆ _socket


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