BMA Server Framework
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
core::TLSServerSocket Class Reference

#include <TLSServerSocket.h>

Inheritance diagram for core::TLSServerSocket:
Inheritance graph
[legend]
Collaboration diagram for core::TLSServerSocket:
Collaboration graph
[legend]

Public Member Functions

 TLSServerSocket (EPoll &ePoll, std::string url, short int port)
 
 ~TLSServerSocket ()
 
- Public Member Functions inherited from core::TCPServerSocket
 TCPServerSocket (EPoll &ePoll, std::string url, short int port)
 
 ~TCPServerSocket ()
 
void removeFromSessionList (Session *session)
 
- Public Member Functions inherited from core::TCPSocket
 TCPSocket (EPoll &ePoll)
 
void connect (IPAddress &address)
 
virtual void output (std::stringstream &out)
 
- Public Member Functions inherited from core::Socket
 Socket (EPoll &ePoll)
 
void setDescriptor (int descriptor)
 Set the descriptor for the socket.
 
int getDescriptor ()
 Get the descriptor for the socket.
 
void eventReceived (struct epoll_event event)
 Parse epoll event and call specified callbacks. More...
 
void write (std::string data)
 
void write (char *buffer, int length)
 
void output (std::stringstream &out)
 
virtual void onRegistered ()
 Called when the socket has finished registering with the epoll processing. More...
 
virtual void onUnregistered ()
 Called when the socket has finished unregistering for the epoll processing. More...
 
void enable (bool mode)
 Enable the socket to read or write based upon buffer.
 
- Public Member Functions inherited from core::Command
virtual bool check (std::string request)
 
virtual void output (Session *session)
 
void setName (std::string name)
 
std::string getName ()
 

Public Attributes

SSL_CTX * ctx
 
- Public Attributes inherited from core::TCPServerSocket
std::vector< Session * > sessions
 
CommandList commands
 
- Public Attributes inherited from core::TCPSocket
IPAddress ipAddress
 
- Public Attributes inherited from core::Socket
class {
bufferSize
 
- Public Attributes inherited from core::Object
std::string name
 
std::string tag
 

Protected Member Functions

SessiongetSocketAccept () override
 
- Protected Member Functions inherited from core::TCPServerSocket
virtual void init ()
 
void onDataReceived (std::string data) override
 
int processCommand (std::string command, Session *session) override
 
- Protected Member Functions inherited from core::Socket
void setBufferSize (int length)
 
virtual void onConnected ()
 Called when socket is open and ready to communicate. More...
 
virtual void onTLSInit ()
 
void shutdown ()
 
virtual void receiveData (char *buffer, int bufferLength)
 

Additional Inherited Members

- Protected Attributes inherited from core::Socket
EPollePoll
 
bool shutDown = false
 

Detailed Description

TLSServerSocket

Manage a socket connection as a TLS server type. Connections to the socket are processed through the accept functionality.

Constructor & Destructor Documentation

◆ TLSServerSocket()

core::TLSServerSocket::TLSServerSocket ( EPoll ePoll,
std::string  url,
short int  port 
)

The constructor for the BMATLSSocket object.

Parameters
ePollthe BMAEPoll instance that manages the socket.
urlthe IP address for the socket to receive connection requests.
portthe port number that the socket will listen on.
commandNamethe name of the command used to invoke the status display for this object.
Returns
the instance of the BMATLSServerSocket.

◆ ~TLSServerSocket()

core::TLSServerSocket::~TLSServerSocket ( )

The destructor for this object.

Member Function Documentation

◆ getSocketAccept()

Session * core::TLSServerSocket::getSocketAccept ( )
overrideprotectedvirtual

getSocketAccept is designed to allow a polymorphic extension of this object to return a type of object that extends the definition of the server socket. Returning the appropriate session object that extends from BMASession provides the mechanism where the server can select the protocol dialog for the desired service.

Implements core::TCPServerSocket.


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