BMA Server Framework
Public Member Functions | Public Attributes | List of all members
BMAConsoleServer Class Reference
Inheritance diagram for BMAConsoleServer:
Inheritance graph
[legend]
Collaboration diagram for BMAConsoleServer:
Collaboration graph
[legend]

Public Member Functions

 BMAConsoleServer (BMAEPoll &ePoll, std::string url, short int port)
 
void sendToConnectedConsoles (std::string out)
 
BMASessiongetSocketAccept () override
 
void registerCommand (BMACommand &command)
 
void output (BMASession *session) override
 Output the consoles array to the console.
 
- Public Member Functions inherited from BMATCPServerSocket
 BMATCPServerSocket (BMAEPoll &ePoll, std::string url, short int port, std::string commandName)
 
 ~BMATCPServerSocket ()
 
void removeFromSessionList (BMASession *session)
 
- Public Member Functions inherited from BMATCPSocket
 BMATCPSocket (BMAEPoll &ePoll)
 
void connect (BMAIPAddress &address)
 
virtual void output (std::stringstream &out)
 
- Public Member Functions inherited from BMASocket
 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.
 
- Public Member Functions inherited from BMACommand
 BMACommand (std::string commandName)
 

Public Attributes

std::vector< BMACommand * > commands
 
- Public Attributes inherited from BMATCPServerSocket
std::vector< BMASession * > sessions
 
- Public Attributes inherited from BMATCPSocket
BMAIPAddress ipAddress
 
- Public Attributes inherited from BMASocket
class {
bufferSize
 
- Public Attributes inherited from BMAObject
std::string name
 
std::string tag
 
- Public Attributes inherited from BMACommand
std::string commandName
 

Additional Inherited Members

- Protected Member Functions inherited from BMATCPServerSocket
virtual void init ()
 
void onDataReceived (std::string data) override
 
void processCommand (std::string command, BMASession *session) override
 
- Protected Member Functions inherited from BMASocket
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)
 
- Protected Attributes inherited from BMASocket
BMAEPollePoll
 
bool shutDown = false
 

Member Function Documentation

◆ getSocketAccept()

BMASession * BMAConsoleServer::getSocketAccept ( )
overridevirtual

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.


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