diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-24 12:04:46 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-24 12:04:46 +0100 |
commit | 91150588036fc3d8611f659fad063138e25b2cd8 (patch) | |
tree | 49f158f9c8ce60631577cb08851d96e139d43b3e /src/server | |
parent | 64d80e44c3c2f0cdd51632757bab8158b314a413 (diff) | |
download | chawan-91150588036fc3d8611f659fad063138e25b2cd8.tar.gz |
bufreader: add initPacketReader
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/buffer.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim index bcc39aa2..e952d9aa 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -1791,11 +1791,9 @@ macro bufferDispatcher(funs: static ProxyMap; buffer: Buffer; return switch proc readCommand(buffer: Buffer) = + var r = buffer.pstream.initPacketReader() var cmd: BufferCommand - var len: int var packetid: int - buffer.pstream.sread(len) - var r = buffer.pstream.initReader(len) r.sread(cmd) r.sread(packetid) bufferDispatcher(ProxyFunctions, buffer, cmd, packetid, r) |