Commit Graph

116 Commits

Author SHA1 Message Date
TheMode 13c05626e2 Handle the connection exception being null
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-16 07:50:12 +02:00
TheMode 3211831073 Ensure that the viewable element can be collected
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-16 07:43:08 +02:00
TheMode 2d3daf2504 Share code
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-14 07:20:58 +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 2f9b649466 Reduce memory used for viewable packets
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-13 23:01:37 +02:00
TheMode e1a3c295a2 Add dedicated PooledBuffers class
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-13 22:12:07 +02:00
TheMode 6355f06d53 Compression buffer has now multiple purpose
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-10 06:35:34 +02:00
TheMode 6ab94bb778 One less magic value
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-09 00:26:10 +02:00
TheMode d7a116c144 Prevent buffer being resized in `writeFramedPacket`, it is now possible to know if a buffer couldn't be written to
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-08 22:26:18 +02:00
TheMode 21bac6fba4 Better name for the local deflater, add link to the packet format
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-08 20:31:13 +02:00
TheMode 1c76fd152e Fix viewable packet when a connection has multiple pairs
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-07 04:47:33 +02:00
TheMode adf1023e35 There is no commit here - fix compression
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-07 01:31:34 +02:00
TheMode 8f1e84ffdb Prevent framed packets from being corrupted
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-07 01:24:51 +02:00
TheMode b2a0b91a45 Add warning in PacketUtils
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-06 13:40:11 +02:00
TheMode 026550ac07 Simplify PacketUtils
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-05 02:50:59 +02:00
TheMode 7b8277b6be Do not flip the buffer inside #write(ByteBuffer)
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-04 23:56:27 +02:00
TheMode f717279adc Independent socket send & receive buffer size
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-04 16:43:45 +02:00
TheMode af82bf1236 Reduce allocations for chunk packet writing 2021-08-26 10:55:56 +02:00
TheMode 024f8d36bd API cleanup 2021-08-26 10:36:31 +02:00
TheMode 73f125763c Use a lock + weak map 2021-08-25 17:25:08 +02:00
TheMode e185bca468 Fix obvious packet corruption 2021-08-25 13:54:09 +02:00
TheMode 5e18f48a1b Cleanup 2021-08-25 10:45:35 +02:00
TheMode 2ae0c0bbcd Batch movement packets 2021-08-25 09:01:13 +02:00
TheMode 6520855418 Fix buffer offset 2021-08-24 21:21:51 +02:00
TheMode ec66beece4 Initial viewable broadcast attempt 2021-08-24 14:59:17 +02:00
TheMode 168672e002 Keep reference to the framed packet for debugging/transformation purpose 2021-08-14 14:39:11 +02:00
TheMode d4f74abc64 Include original packet in `FramedPacket` for debugging/listening purpose 2021-08-13 19:58:14 +02:00
TheMode 322572c96d Rename to `LocalCache` 2021-08-13 01:13:58 +02:00
TheMode 78126fad6c Add experimental local buffer API. Remove allocation when writing chunk packets (should help with startup time) 2021-08-13 01:08:19 +02:00
TheMode ea951f9566 Less allocation for compressed packets 2021-08-11 14:47:20 +02:00
TheMode fd08cabb6a Change default tab implementation to show all online players 2021-08-11 14:18:04 +02:00
TheMode 1b708bc851 Fix BinaryBuffer#canWrite, use read-only buffers for caching 2021-08-09 01:45:00 +02:00
TheMode 1591df16aa Rename `netty` to `socket` wherever possible 2021-08-08 19:11:47 +02:00
TheMode aa2a6522dc Increase socket size, cache direct buffers 2021-08-05 15:42:16 +02:00
TheMode 87f141ff50 Simplify packet writing 2021-08-05 03:09:45 +02:00
TheMode 58487f4455 Add PacketUtils#allocateTrimmedPacket 2021-08-05 00:08:53 +02:00
TheMode 120b58db6a Fix ghost player, trim chunk/light packets 2021-08-04 21:02:59 +02:00
TheMode 9b9d3f3405 Better chunk packet caching 2021-08-04 16:49:01 +02:00
TheMode 174ef14303 Reuse grouped buffers 2021-08-04 12:41:15 +02:00
TheMode 8895e49a52 Improve socket shutdown 2021-08-04 05:15:40 +02:00
TheMode 557d34c378 Reduce allocation count 2021-08-04 04:00:42 +02:00
TheMode 9bb50430d4 Fix memory leak, decrease socket size 2021-08-04 03:53:01 +02:00
TheMode 66b567597a Fix connection crash
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-04 00:37:17 +02:00
TheMode 548cee55e0 Fix compression
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 21:16:24 +02:00
TheMode 65df72fa82 Remove write branching
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 20:18:38 +02:00
TheMode 1c3bb5b0ff First NIO attempt
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 12:57:13 +02:00
TheMode 1e9046d792 Remove velocity compression library 2021-06-20 20:59:53 +02:00
Kieran Wallbanks 58e108bd37 Fix deprecated API usages 2021-06-15 13:19:49 +01:00
TheMode 4ab35fbbc0 Remove magic value for pre-filled var ints 2021-05-11 03:10:18 +02:00
TheMode d41a4dcf54 Reduce grouped packet buffer overhead 2021-05-10 11:16:17 +02:00