Many changes to ServerCore
This commit is contained in:
1 parent
6969ef0fbb
commit
d445834af6
83 files changed
+666
-756
No files matched your search
+37
-19
@@ -26,13 +26,12 @@ namespace core {
|
||||
public:
|
||||
|
||||
///
|
||||
/// The constructor for the BMATCPSocket object.
|
||||
/// The constructor for the TCPServer object.
|
||||
///
|
||||
/// @param ePoll the EPoll instance that manages the socket.
|
||||
/// @param url the IP address for the socket to receive connection requests.
|
||||
/// @param port the port number that the socket will listen on.
|
||||
/// @param commandName the name of the command used to invoke the status display for this object.
|
||||
/// @return the instance of the BMATCPServerSocket.
|
||||
///
|
||||
|
||||
TCPServer(EPoll &ePoll, IPAddress address, std::string text = "");
|
||||
@@ -43,22 +42,6 @@ namespace core {
|
||||
|
||||
~TCPServer();
|
||||
|
||||
///
|
||||
/// If not NULL the blacklist object can be assigned to this server socket and the server
|
||||
/// IP addresses connecting to the server attempting to accept a socket are contained in
|
||||
/// this list then the connection is rejected and no accept is granted.
|
||||
///
|
||||
|
||||
IPAddressList *blackList;
|
||||
|
||||
///
|
||||
/// If not NULL the blacklist object can be assigned to this server socket and the server
|
||||
/// IP addresses connecting to the server attempting to accept a socket are contained in
|
||||
/// this list then the connection is rejected and no accept is granted.
|
||||
///
|
||||
|
||||
IPAddressList *whiteList;
|
||||
|
||||
void removeFromSessionList(TCPSession *session);
|
||||
|
||||
virtual void sessionErrorHandler(std::string errorString, std::stringstream &out);
|
||||
@@ -88,6 +71,26 @@ namespace core {
|
||||
|
||||
CommandList commands;
|
||||
|
||||
///
|
||||
/// If not NULL the blacklist object can be assigned to this server socket and the server
|
||||
/// IP addresses connecting to the server attempting to accept a socket are contained in
|
||||
/// this list then the connection is rejected and no accept is granted.
|
||||
///
|
||||
|
||||
IPAddressList *blackList;
|
||||
|
||||
///
|
||||
/// If not NULL the blacklist object can be assigned to this server socket and the server
|
||||
/// IP addresses connecting to the server attempting to accept a socket are contained in
|
||||
/// this list then the connection is rejected and no accept is granted.
|
||||
///
|
||||
|
||||
IPAddressList *whiteList;
|
||||
|
||||
void removeFromSessionList(TCPSession *session);
|
||||
|
||||
void output(TCPSession *session); ///<Output the consoles array to the console.
|
||||
|
||||
protected:
|
||||
|
||||
///
|
||||
@@ -109,7 +112,22 @@ namespace core {
|
||||
/// @param the session object to write the output to.
|
||||
///
|
||||
|
||||
int processCommand(std::string command, TCPSession *session, std::stringstream &data) override;
|
||||
int processCommand(coreutils::ZString command, TCPSession *session, std::stringstream &data) override;
|
||||
|
||||
///
|
||||
/// Use this sendToAll method to output the contents of the out stream
|
||||
/// to all the connections on the server excluding the sender session.
|
||||
///
|
||||
|
||||
void sendToAll(std::stringstream &out, SessionFilter &filter, TCPSession *sender);
|
||||
|
||||
///
|
||||
/// Use this sendToAll method to output the contents of the out stream
|
||||
/// to all the connections on the server excluding the sender session
|
||||
/// and the entries identified by the passed in filter object.
|
||||
///
|
||||
|
||||
void sendToAll(std::stringstream &out, TCPSession *sender);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in new issue
Block a user