8
8
import arc .util .io .ByteBufferOutput ;
9
9
10
10
11
- /** @implNote This class must be the same for the client and the server. */
11
+ /** @implNote This class must be the same for client and server. */
12
12
public class ClajPackets {
13
13
/** Identifier for CLaJ packets */
14
14
public static final byte id = -4 ; /*doesn't uses other claj packet identifier to avoid problems*/
@@ -64,8 +64,8 @@ public void write(ByteBufferOutput write) {
64
64
write0 (write );
65
65
}
66
66
67
- public void read0 (ByteBufferInput read ) {};
68
- public void write0 (ByteBufferOutput write ) {};
67
+ protected void read0 (ByteBufferInput read ) {};
68
+ protected void write0 (ByteBufferOutput write ) {};
69
69
}
70
70
71
71
/** Special packet for connection packet wrapping. */
@@ -77,11 +77,11 @@ public static class ConnectionPacketWrapPacket extends ConnectionWrapperPacket {
77
77
78
78
public boolean isTCP ;
79
79
80
- public void read0 (ByteBufferInput read ) {
80
+ protected void read0 (ByteBufferInput read ) {
81
81
isTCP = read .readBoolean ();
82
82
}
83
83
84
- public void write0 (ByteBufferOutput write ) {
84
+ protected void write0 (ByteBufferOutput write ) {
85
85
write .writeBoolean (isTCP );
86
86
}
87
87
}
@@ -91,24 +91,24 @@ public static class ConnectionClosedPacket extends ConnectionWrapperPacket {
91
91
92
92
public DcReason reason ;
93
93
94
- public void read0 (ByteBufferInput read ) {
94
+ protected void read0 (ByteBufferInput read ) {
95
95
byte b = read .readByte ();
96
96
reason = b < 0 || b >= reasons .length ? DcReason .error : reasons [b ];
97
97
}
98
98
99
- public void write0 (ByteBufferOutput write ) {
99
+ protected void write0 (ByteBufferOutput write ) {
100
100
write .writeByte ((byte )reason .ordinal ());
101
101
}
102
102
}
103
103
104
104
public static class ConnectionJoinPacket extends ConnectionWrapperPacket {
105
105
public long roomId = -1 ;
106
-
107
- public void read0 (ByteBufferInput read ) {
106
+
107
+ protected void read0 (ByteBufferInput read ) {
108
108
roomId = read .readLong ();
109
109
}
110
110
111
- public void write0 (ByteBufferOutput write ) {
111
+ protected void write0 (ByteBufferOutput write ) {
112
112
write .writeLong (roomId );
113
113
}
114
114
}
0 commit comments