sync from server

This commit is contained in:
2026-07-23 22:42:12 -05:00
parent d091879773
commit d6792bf0e0
3 changed files with 7 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ Logger = (
TcpServer = ( TcpServer = (
{ {
Id = "main"; Id = "main";
Hostname = "accordion.vxbard.net"
Port = 39500; Port = 39500;
} }
); );

View File

@@ -68,9 +68,11 @@ ErrorCode TcpServer::init() {
// configure for listening // configure for listening
memset(buffer, 0x0, sizeof(buffer)); // clear our buffer so we know for sure any data in it is the client's memset(buffer, 0x0, sizeof(buffer)); // clear our buffer so we know for sure any data in it is the client's
if(listen(serverSocket, 10) < 0) { // configure the socket as a passive server with a fifo queue 10 requests long if(listen(serverSocket, 4096) < 0) { // configure the socket as a passive server with a fifo queue n requests long
logger_->log("TcpServer", LogFlag::Debug, "Server listening on port {}...", configuration_.port); logger_->log("TcpServer", LogFlag::Error, "Unable to listen.");
return ErrorCode::Error;
} }
logger_->log("TcpServer", LogFlag::Debug, "Server listening on port {}...", configuration_.port);
// configure pollfds // configure pollfds
memset(sockets, 0, sizeof(sockets)); // clear all memset(sockets, 0, sizeof(sockets)); // clear all

View File

@@ -6,6 +6,7 @@
struct ServerParams { struct ServerParams {
std::string id; std::string id;
std::string hostname;
uint32_t port; uint32_t port;
}; };
@@ -21,6 +22,7 @@ public:
return false; return false;
} }
setting.lookupValue("Hostname", params_->hostname);
setting.lookupValue("Port", params_->port); setting.lookupValue("Port", params_->port);
return true; return true;