Replacing Networking (#271)
- [X] Removing Kestrel & Libuv - [X] Cleaning up NetState - [X] Removing System.IO.Pipelines - [X] Cleaning up packet reading - [X] Adds a maximum of 5000 sockets (configurable) to prevent OOM - [X] Replaces the AsyncState with a thread-safe wrapped boolean called NetworkState - [X] Removes Parallel.ForEach (no perf gain) - [X] Removes custom houses compression on another thread - [X] Test high load scenarios Bumps release version
This commit is contained in:
parent
8603e31023
commit
369a27b800
47 changed files with 1780 additions and 1569 deletions
|
|
@ -14,7 +14,7 @@ namespace Server
|
|||
{
|
||||
public static class Utility
|
||||
{
|
||||
private static Encoding m_UTF8, m_UTF8WithEncoding;
|
||||
private static Encoding m_UTF8, m_UTF8WithEncoding, m_Unicode, m_UnicodeLE;
|
||||
|
||||
private static Dictionary<IPAddress, IPAddress> _ipAddressTable;
|
||||
|
||||
|
|
@ -103,6 +103,8 @@ namespace Server
|
|||
|
||||
public static Encoding UTF8 => m_UTF8 ??= new UTF8Encoding(false, false);
|
||||
public static Encoding UTF8WithEncoding => m_UTF8WithEncoding ??= new UTF8Encoding(true, false);
|
||||
public static Encoding Unicode => m_Unicode ??= new UnicodeEncoding(true, false, false);
|
||||
public static Encoding UnicodeLE => m_UnicodeLE ??= new UnicodeEncoding(false, false, false);
|
||||
|
||||
public static void Separate(StringBuilder sb, string value, string separator)
|
||||
{
|
||||
|
|
@ -126,6 +128,11 @@ namespace Server
|
|||
|
||||
public static IPAddress Intern(IPAddress ipAddress)
|
||||
{
|
||||
if (ipAddress == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
_ipAddressTable ??= new Dictionary<IPAddress, IPAddress>();
|
||||
|
||||
if (!_ipAddressTable.TryGetValue(ipAddress, out var interned))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue