ModernUO/Projects/UOContent/Engines
Kamron Batman 10a69bf754
feat: Adds a memory mirrored ring buffer for networking. (#1533)
## Breaking Changes

Incoming packet registration signature has changed to:
```cs
delegate* void OnReceiveCallback(NetState state, SpanReader reader, int packetLength);

IncomingPackets.Register(int packetID, int length, bool ingame, OnReceiveCallback onReceive);
```

For example, an incoming packet handler signature would now look like this:
```cs
public static void SomeIncomingPacket(NetState state, SpanReader reader, int packetLength)
{
    // Parse the data
}
```

## Summary

Updates the network Pipe class to use a mirrored memory technique. This technique involves mapping the same physical memory to two contiguous virtual memory spaces so the byte buffer appears duplicated. This allows writing to a double-sized array to wrap around without the need for the `CircularBuffer` classes.

In practice this allows us to use `Span<byte>` as if the buffer was a regular array.


### Bug Fixes

- [X] Fixes bad fixed length string parsing
2023-10-09 00:57:53 -07:00
..
Bulk Orders fix: Codegens BulkOrderBooks (#1531) 2023-10-03 20:44:15 -07:00
CannedEvil fix: Fixes extension method refactors causing crash (#1529) 2023-10-02 22:24:16 -07:00
Chat feat: Adds a memory mirrored ring buffer for networking. (#1533) 2023-10-09 00:57:53 -07:00
ConPVP fix: Optimizes FindItemsByType by removing allocations. (#1515) 2023-09-28 19:36:45 -07:00
Craft fix: Fixes missing inscription message (#1518) 2023-09-29 21:38:06 -07:00
Doom fix: Codegens Khaldun and Doom (#1521) 2023-09-30 00:27:06 -07:00
Ethics feat: Adds Stamina System to overhaul overweight. (#1465) 2023-09-16 17:52:54 -07:00
Events fix(core): Caches DateTime.NowUtc (#548) 2021-03-13 01:32:04 -08:00
Factions fix: Cleans up entity persistence. Generalizes Mobiles/Items/Guilds (#1528) 2023-10-01 22:10:47 -07:00
Harvest fix: Optimizes FindItemsByType by removing allocations. (#1515) 2023-09-28 19:36:45 -07:00
Help feat: Adds KR/EC client versions (No actual support yet). (#1506) 2023-09-18 23:53:18 -07:00
Khaldun fix: Codegens Khaldun and Doom (#1521) 2023-09-30 00:27:06 -07:00
ML Quests feat: Adds a memory mirrored ring buffer for networking. (#1533) 2023-10-09 00:57:53 -07:00
Party fix: Fixes more packet initializations (#1507) 2023-09-19 00:02:17 -07:00
Pathing fix: Removes run flag from NPC movement (#1357) 2023-03-02 10:58:17 -08:00
Plants fix: Cleans up FindItems and removes allocations (#1516) 2023-09-28 22:20:36 -07:00
Player Murder System fix: Fixes extension method refactors causing crash (#1529) 2023-10-02 22:24:16 -07:00
Quests fix: Overhauls virtue system (#1376) 2023-07-19 21:43:47 -07:00
Spawners chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Stealables fix: Cleans up entity persistence. Generalizes Mobiles/Items/Guilds (#1528) 2023-10-01 22:10:47 -07:00
Treasures of Tokuno fix: Codegens ToT and replaces persistence with config (#1524) 2023-09-30 02:09:28 -07:00
UltimaStore feat: Adds a memory mirrored ring buffer for networking. (#1533) 2023-10-09 00:57:53 -07:00
Veteran Rewards fix: Codegens character statues (#1523) 2023-09-30 01:30:47 -07:00
Virtues fix: Fixes extension method refactors causing crash (#1529) 2023-10-02 22:24:16 -07:00