Made server a pointer for eliminating TCPSession2.
This commit is contained in:
1 parent
6c7fc7d28f
commit
a391882541
14 files changed
+336
-461
No files matched your search
+8
-8
@@ -9,13 +9,13 @@ namespace core {
|
||||
TCPServer::TCPServer(EPoll &ePoll, IPAddress address, std::string delimiter, int depth, std::string text)
|
||||
: TCPSocket(ePoll, text), commands(delimiter, depth) {
|
||||
|
||||
commands.add(subscriptions, "publish");
|
||||
commands.add(subscriptions, "unpublish");
|
||||
commands.add(subscriptions, "subscribe");
|
||||
commands.add(subscriptions, "unsubscribe");
|
||||
commands.add(subscriptions, "catalog");
|
||||
commands.add(subscriptions, "event");
|
||||
commands.add(subscriptions, "invite");
|
||||
// commands.add(subscriptions, "publish"); // This needs to be removed and put into the servers that
|
||||
// commands.add(subscriptions, "unpublish"); // Others make. Plus it should be in a manager object that
|
||||
// commands.add(subscriptions, "subscribe"); // encapsulates all of the function.
|
||||
// commands.add(subscriptions, "unsubscribe");
|
||||
// commands.add(subscriptions, "catalog");
|
||||
// commands.add(subscriptions, "event");
|
||||
// commands.add(subscriptions, "invite");
|
||||
|
||||
setDescriptor(socket(AF_INET, SOCK_STREAM, 0));
|
||||
int yes = 1;
|
||||
@@ -84,7 +84,7 @@ namespace core {
|
||||
}
|
||||
|
||||
TCPSession * TCPServer::getSocketAccept(EPoll &ePoll) {
|
||||
return new TCPSession(ePoll, *this);
|
||||
return new TCPSession(ePoll, this);
|
||||
}
|
||||
|
||||
void TCPServer::output(std::stringstream &out) {
|
||||
|
||||
Reference in new issue
Block a user