Updates networking to make pipe writer awaitable (#290)

- [X] Updates result so it is preallocated
- [X] Updates PipeWriter so it is awaitable
- [X] Simplifies NetState code to match changes
- [X] Adds a byte for empty checking so incoming/outgoing can have full pipes.

Bumps release version
This commit is contained in:
Kamron Batman 2020-10-27 11:22:07 -07:00 committed by GitHub
parent 99bfff40df
commit 5f7e4bf050
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 292 additions and 210 deletions

View file

@ -277,9 +277,9 @@ namespace Server.Network
}
}
public static int ProcessPacket(NetState ns, ref CircularBuffer<byte> buffer)
public static int ProcessPacket(NetState ns, ArraySegment<byte>[] buffer)
{
var reader = new CircularBufferReader(ref buffer);
var reader = new CircularBufferReader(buffer);
var packetId = reader.ReadByte();