satori gay

This commit is contained in:
malloc 2018-11-13 16:24:42 -06:00
parent f0ae8feb26
commit cfcdcc4cd4
4 changed files with 49 additions and 11 deletions

View file

@ -0,0 +1,40 @@
[General]
Run Master = true
Master Host = localhost
Master Port = 5050
[Defaults]
; amount of threads to start with (never close)
Initial Count = 3
; starting limit of clients per thread
Initial Size = 3
; amount the limit scales when threshold is passed
Size Growth = 1
; any values below marked -1 indicates no limit
; max amount of clients in scaled thread
Max Size = -1
; maximum number of threads
Max Count = -1
; maximum number of connections in the pool
Max Total = -1
; excess deviance from threshold necessary to rebalance
Tolerance = -1
[Master to Client]
Port = 5050
[Master to Slave]
Port = 8008
[Slave]
Port = 9000
Name = Test Server 1
[Slave]
Port = 9001
Name = Test Server 2
[Slave]
Port = 9002
Name = Test Server 3

View file

@ -1,5 +0,0 @@
; test ini file
[Test Section]
TEST = ARE YOU SQWOOBIN
ANSWER = TRUE

View file

@ -84,6 +84,12 @@ bool sosc::MasterClient::Process(const db::Queries *queries) {
} }
bool sosc::MasterClient::ProcessLogin(Packet &pck) { bool sosc::MasterClient::ProcessLogin(Packet &pck) {
if(this->authed)
return true;
if(!pck.Check(2, PCK_ANY, PCK_ANY))
return false;
db::Query* query = this->queries->at(QRY_USER_NAME_EXISTS);
return true; return true;
} }

View file

@ -122,15 +122,13 @@ int main(int argc, char **argv) {
configure_poolinfo(&info, (*config)["master to slave"][0]); configure_poolinfo(&info, (*config)["master to slave"][0]);
_ctx.master_intra = new master_intra_ctx; _ctx.master_intra = new master_intra_ctx;
master_intra_start( master_intra_start(
(uint16_t)(*config)["master"]["intra port"], (uint16_t)(*config)["master"]["intra port"], info
poolinfo_t()
); );
configure_poolinfo(&info, (*config)["master to client"][0]); configure_poolinfo(&info, (*config)["master to client"][0]);
_ctx.master_client = new master_client_ctx; _ctx.master_client = new master_client_ctx;
master_client_start( master_client_start(
(uint16_t)(*config)["master"]["client port"], (uint16_t)(*config)["master"]["client port"], info
poolinfo_t()
); );
} }
@ -142,8 +140,7 @@ int main(int argc, char **argv) {
configure_poolinfo(&info, (*config)["slave"][i]); configure_poolinfo(&info, (*config)["slave"][i]);
slave_start( slave_start(
(uint16_t)(*config)["slave"][i]["port"], (uint16_t)(*config)["slave"][i]["port"],
poolinfo_t(), info, _ctx.slaves + i
_ctx.slaves + i
); );
} }
} }