BMA Server Framework
|
#include <BMATLSServerSocket.h>
Public Member Functions | |
BMATLSServerSocket (BMAEPoll &ePoll, std::string url, short int port, std::string commandName) | |
~BMATLSServerSocket () | |
![]() | |
BMATCPServerSocket (BMAEPoll &ePoll, std::string url, short int port, std::string commandName) | |
~BMATCPServerSocket () | |
void | removeFromSessionList (BMASession *session) |
![]() | |
BMATCPSocket (BMAEPoll &ePoll) | |
void | connect (BMAIPAddress &address) |
virtual void | output (std::stringstream &out) |
![]() | |
BMASocket (BMAEPoll &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. | |
![]() | |
BMACommand (std::string commandName) | |
virtual void | output (BMASession *session) |
Public Attributes | |
SSL_CTX * | ctx |
![]() | |
std::vector< BMASession * > | sessions |
![]() | |
BMAIPAddress | ipAddress |
![]() | |
class { | |
} | bufferSize |
![]() | |
std::string | name |
std::string | tag |
![]() | |
std::string | commandName |
Protected Member Functions | |
BMASession * | getSocketAccept () override |
![]() | |
virtual void | init () |
void | onDataReceived (std::string data) override |
void | processCommand (std::string command, BMASession *session) override |
![]() | |
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 | |
![]() | |
BMAEPoll & | ePoll |
bool | shutDown = false |
Manage a socket connection as a TLS server type. Connections to the socket are processed through the accept functionality.
BMATLSServerSocket::BMATLSServerSocket | ( | BMAEPoll & | ePoll, |
std::string | url, | ||
short int | port, | ||
std::string | commandName | ||
) |
The constructor for the BMATLSSocket object.
ePoll | the BMAEPoll instance that manages the socket. |
url | the IP address for the socket to receive connection requests. |
port | the port number that the socket will listen on. |
commandName | the name of the command used to invoke the status display for this object. |
BMATLSServerSocket::~BMATLSServerSocket | ( | ) |
The destructor for this object.
|
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 BMATCPServerSocket.