Commit Graph

218 Commits

Author SHA1 Message Date
TheMode
1dd2cc72ee
1.19.2 (#774) 2022-09-05 13:54:58 +02:00
TheMode
1bf750a603 Make PlayerPacketOutEvent cancellable
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-07 18:12:54 +02:00
TheMode
20dcf91f4a Do not write packet after disconnection
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-09 16:40:51 +02:00
TheMode
2289cf32e1 Fix unnecessary allocation on ping
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-04 22:43:02 +02:00
TheMode
8d7175af73
Replace thread locals to pool (#1079) 2022-05-16 07:34:47 +02:00
TheMode
198618ba98 Add rate limiter for incoming packets
Signed-off-by: TheMode <themode@outlook.fr>
2022-04-15 12:25:58 +02:00
TheMode
7a371fe616 Do not fallback to waiting list
Signed-off-by: TheMode <themode@outlook.fr>
2022-04-02 23:35:11 +02:00
TheMode
ff8dd0cdaa Misc networking improvements
Signed-off-by: TheMode <themode@outlook.fr>
2022-04-02 22:05:29 +02:00
themode
71b6e8df90 Misc network improvement 2022-03-20 03:22:38 +01:00
themode
54fd65eded Remove writeAndFlush 2022-03-20 02:35:45 +01:00
themode
b304e1328a Fix packet parsing for disconnected clients 2022-03-20 02:29:00 +01:00
themode
62a7346f40 cacheBuffer does not need to be volatile 2022-02-20 13:15:46 +01:00
themode
a15156aeb4 Add EncryptionContext 2022-02-20 12:58:09 +01:00
TheMode
9b04e89552
Add PlayerPacketOutEvent (#689) 2022-02-17 13:51:55 +01:00
TheMode
87d5a33c76
Fix corruption when receiving multiple compressed packets (#611)
Signed-off-by: TheMode <themode@outlook.fr>
2022-01-29 10:18:23 +01:00
themode
0b4dd3b8aa Heavily reduce the number of direct buffers required for each worker 2022-01-26 06:37:46 +01:00
TheMode
d0b874ed7c Move local buffers
Signed-off-by: TheMode <themode@outlook.fr>
2022-01-26 05:01:43 +01:00
themode
39a0923326 Add LazyPacket 2022-01-10 16:51:21 +01:00
themode
7df51ef606 Simplify CachedPacket 2022-01-10 16:51:21 +01:00
themode
bb1b1e53d7 Improve performance when cached packets are disabled 2022-01-10 16:51:21 +01:00
TheMode
5b4ffa0846 Add SendablePacket#extractServerPacket
Signed-off-by: TheMode <themode@outlook.fr>
2022-01-10 16:51:21 +01:00
TheMode
076b11b77a Separate concern for packet reading
Signed-off-by: TheMode <themode@outlook.fr>
2022-01-10 16:51:21 +01:00
TheMode
02de469cad Use relaxedOffer, copy packet list to prevent modifications
Signed-off-by: TheMode <themode@outlook.fr>
2021-11-21 14:34:24 +01:00
TheMode
767c743e01 Batch sendPackets list content in a single message
Signed-off-by: TheMode <themode@outlook.fr>
2021-11-17 23:12:54 +01:00
TheMode
785bcb8b6d Fast exit if tick buffer can be reused
Signed-off-by: TheMode <themode@outlook.fr>
2021-11-17 09:20:36 +01:00
TheMode
8b1856d5b7
Async packet write (#533) 2021-11-17 06:31:24 +01:00
TheMode
c5e947c76e Move CachedPacket and FramedPacket
Signed-off-by: TheMode <themode@outlook.fr>
2021-11-17 00:48:43 +01:00
TheMode
ae08ac2987 Do not flush if channel is closed
Signed-off-by: TheMode <themode@outlook.fr>
2021-11-08 09:11:02 +01:00
TheMode
acc711c640
Revert "Volatile encryption (#515)" (#516)
This reverts commit 0f15d4a273.
2021-11-03 09:17:23 +01:00
TheMode
0f15d4a273
Volatile encryption (#515) 2021-11-03 09:06:06 +01:00
TheMode
970d4d2d9c Allow buffer index/length to be specified
Signed-off-by: TheMode <themode@outlook.fr>
2021-11-02 03:08:36 +01:00
TheMode
f86d91f9b8 Fix online mode
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-26 00:44:16 +02:00
TheMode
23d59cb135 Returned framed buffers should be flipped
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-26 00:05:03 +02:00
TheMode
00401bed25 Avoid allocation when writing framed packets
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-25 23:55:20 +02:00
TheMode
1851ea7eca Move OOM try-catch
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-25 10:08:25 +02:00
TheMode
06189ee783
Async flush (#492) 2021-10-16 19:55:24 +02:00
TheMode
bd4aa90753
Framed packet cleanup (#489) 2021-10-13 06:33:44 +02:00
TheMode
11806b9166 Ensure no packet corruption due to encryption. A proxy is still recommended for optimal performance
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-06 21:14:08 +02:00
TheMode
2f1e4101d1 Add more try-catch to prevent the worker from returning
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-06 18:47:40 +02:00
TheMode
36bcf69728 Buffer collection cleaner
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-29 18:31:28 +02:00
TheMode
236683c986 No volatile read for compression/encryption
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-26 17:02:05 +02:00
TheMode
68107c9a90 Reuse the tick buffer when possible & avoid iteration
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-22 23:24:22 +02:00
TheMode
17807f35da Add experimental PlayerConnection#sendFramedPacket
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-20 18:59:15 +02:00
TheMode
380f5a5a67 Remove faulty fast exit
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-16 19:50:57 +02:00
TheMode
4b5ec566bd Allow FramedPackets to be sent safely
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-16 19:37:30 +02:00
TheMode
2ecd10a4ec Cipher#update is copy-safe
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-15 03:47:48 +02:00
TheMode
983850171b Use cleaner to reuse connection buffers
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-14 02:22:58 +02:00
TheMode
e1a3c295a2 Add dedicated PooledBuffers class
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-13 22:12:07 +02:00
TheMode
ee95015ed3 Simplify packet reading
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-11 03:39:59 +02:00
TheMode
fd027ecfd7 Do not forget to put the buffer back in the pool queue
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-09 23:18:14 +02:00