satori gay
This commit is contained in:
parent
f0ae8feb26
commit
cfcdcc4cd4
4 changed files with 49 additions and 11 deletions
40
resources/server/config.ini
Normal file
40
resources/server/config.ini
Normal 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
|
|
@ -1,5 +0,0 @@
|
|||
; test ini file
|
||||
|
||||
[Test Section]
|
||||
TEST = ARE YOU SQWOOBIN
|
||||
ANSWER = TRUE
|
|
@ -84,6 +84,12 @@ bool sosc::MasterClient::Process(const db::Queries *queries) {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -122,15 +122,13 @@ int main(int argc, char **argv) {
|
|||
configure_poolinfo(&info, (*config)["master to slave"][0]);
|
||||
_ctx.master_intra = new master_intra_ctx;
|
||||
master_intra_start(
|
||||
(uint16_t)(*config)["master"]["intra port"],
|
||||
poolinfo_t()
|
||||
(uint16_t)(*config)["master"]["intra port"], info
|
||||
);
|
||||
|
||||
configure_poolinfo(&info, (*config)["master to client"][0]);
|
||||
_ctx.master_client = new master_client_ctx;
|
||||
master_client_start(
|
||||
(uint16_t)(*config)["master"]["client port"],
|
||||
poolinfo_t()
|
||||
(uint16_t)(*config)["master"]["client port"], info
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -142,8 +140,7 @@ int main(int argc, char **argv) {
|
|||
configure_poolinfo(&info, (*config)["slave"][i]);
|
||||
slave_start(
|
||||
(uint16_t)(*config)["slave"][i]["port"],
|
||||
poolinfo_t(),
|
||||
_ctx.slaves + i
|
||||
info, _ctx.slaves + i
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue