sync from server
This commit is contained in:
@@ -23,7 +23,7 @@ Logger = (
|
||||
TcpServer = (
|
||||
{
|
||||
Id = "main";
|
||||
|
||||
Hostname = "accordion.vxbard.net"
|
||||
Port = 39500;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -68,9 +68,11 @@ ErrorCode TcpServer::init() {
|
||||
|
||||
// configure for listening
|
||||
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
|
||||
logger_->log("TcpServer", LogFlag::Debug, "Server listening on port {}...", configuration_.port);
|
||||
if(listen(serverSocket, 4096) < 0) { // configure the socket as a passive server with a fifo queue n requests long
|
||||
logger_->log("TcpServer", LogFlag::Error, "Unable to listen.");
|
||||
return ErrorCode::Error;
|
||||
}
|
||||
logger_->log("TcpServer", LogFlag::Debug, "Server listening on port {}...", configuration_.port);
|
||||
|
||||
// configure pollfds
|
||||
memset(sockets, 0, sizeof(sockets)); // clear all
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
struct ServerParams {
|
||||
std::string id;
|
||||
|
||||
std::string hostname;
|
||||
uint32_t port;
|
||||
};
|
||||
|
||||
@@ -21,6 +22,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
setting.lookupValue("Hostname", params_->hostname);
|
||||
setting.lookupValue("Port", params_->port);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user