mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fix packet length.
This commit is contained in:
parent
ec3a7d8f58
commit
40818513aa
@ -6,7 +6,13 @@ import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
|
||||
|
||||
public class GameByteFrameDecoder extends LengthFieldBasedFrameDecoder {
|
||||
|
||||
private static final int MAX_PACKET_LENGTH = 8192 * 16;
|
||||
/**
|
||||
* MAX_PACKET_LENGTH is based on the maximum camera PNG size.
|
||||
* Source: https://superuser.com/a/759030
|
||||
* Maximum camera packet is 320 * 320 Pixel * 4 Bytes per Pixel = 409600.
|
||||
* Adding some for overhead 409600 + 8192 = 417792
|
||||
*/
|
||||
private static final int MAX_PACKET_LENGTH = 417792;
|
||||
private static final int LENGTH_FIELD_OFFSET = 0;
|
||||
private static final int LENGTH_FIELD_LENGTH = 4;
|
||||
private static final int LENGTH_FIELD_ADJUSTMENT = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user