fix(core): Tightens the network stack (#479)
- [X] Removes network pause/resume - [X] Adds back packet profiler - [X] Adds state machine to keep track and trace netstates - [X] Changes NetState.Running back to using an interlock exchange - [X] Adds preliminary packet throttling support ### Packet Throttling - `[GetThrottle <packetId>` to get the delay in milliseconds for that packet - `[SetThrottle <packetId> <delay>` to set the delay in milliseconds for that packet The settings are saved to `Configuration/throttles.json`
This commit is contained in:
parent
1736469ac0
commit
8903028b5f
36 changed files with 1018 additions and 405 deletions
|
|
@ -1762,7 +1762,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if (!ban)
|
||||
{
|
||||
NetState.Pause();
|
||||
NetState.FlushAll();
|
||||
}
|
||||
|
||||
for (var i = 0; i < rads.Count; ++i)
|
||||
|
|
@ -1796,11 +1796,6 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
if (!ban)
|
||||
{
|
||||
NetState.Resume();
|
||||
}
|
||||
|
||||
from.SendGump(
|
||||
new NoticeGump(
|
||||
1060637,
|
||||
|
|
@ -2365,7 +2360,7 @@ namespace Server.Gumps
|
|||
|
||||
if (!hasAccess)
|
||||
{
|
||||
ns.Disconnect();
|
||||
ns.Disconnect("Server has been locked down.");
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
|
@ -3736,7 +3731,7 @@ namespace Server.Gumps
|
|||
"kicking",
|
||||
CommandLogging.Format(m)
|
||||
);
|
||||
ns.Disconnect();
|
||||
ns.Disconnect($"Kicked by {from}.");
|
||||
notice = "They have been kicked.";
|
||||
}
|
||||
else
|
||||
|
|
@ -3762,7 +3757,7 @@ namespace Server.Gumps
|
|||
|
||||
var ns = m.NetState;
|
||||
|
||||
ns?.Disconnect();
|
||||
ns?.Disconnect($"Banned by {from}.");
|
||||
|
||||
notice = "They have been banned.";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue