Servertalk implementation wip, added optional support for pub-key authenticated encryption (via libsodium), not backwards compatible.

This commit is contained in:
KimLS
2016-10-23 17:55:19 -07:00
parent e29ca88a76
commit 1d1df3bf7a
25 changed files with 822 additions and 449 deletions
+17
View File
@@ -34,6 +34,8 @@
#include <signal.h>
#include "../common/net/tcp_server.h"
#include "../common/net/servertalk_server.h"
#include "../common/net/servertalk_client_connection.h"
ChatChannelList *ChannelList;
Clientlist *g_Clientlist;
@@ -144,6 +146,21 @@ int main() {
worldserver->Connect();
EQ::Net::ServertalkServer server;
EQ::Net::ServertalkServerOptions opts;
opts.port = 5999;
server.Listen(opts);
server.OnConnectionIdentified("QueryServ", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> conn) {
Log.Out(Logs::General, Logs::Debug, "New QueryServ Connection....");
});
server.OnConnectionRemoved("QueryServ", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> conn) {
Log.Out(Logs::General, Logs::Debug, "Lost QueryServ connection.");
});
EQ::Net::ServertalkClient client("127.0.0.1", 5999, false, "QueryServ", "User:Root;Password:1234567890");
while(RunLoops) {
Timer::SetCurrentTime();