MCPcopy Create free account
hub / github.com/e2wugui/zeze / onBinary

Method onBinary

ZezeJava/ZezeJavaTest/src/Zezex/TestGameTimer.java:100–113  ·  view source on GitHub ↗
(WebSocket webSocket, ByteBuffer data, boolean last)

Source from the content-addressed store, hash-verified

98 final Zeze.Serialize.ByteBuffer input = Zeze.Serialize.ByteBuffer.Allocate();
99
100 @Override
101 public CompletionStage<?> onBinary(WebSocket webSocket, ByteBuffer data, boolean last) {
102 webSocket.request(1);
103 var n = data.remaining();
104 input.EnsureWrite(n);
105 data.get(input.Bytes, input.WriteIndex, n);
106 input.WriteIndex += n;
107 if (last) {
108 var sc = Protocol.decode(clients.get(0).ClientService, input);
109 logger.info("Sc Web {}", sc != null ? sc.Argument : null);
110 input.Compact();
111 }
112 return null;
113 }
114 });
115 }
116

Callers

nothing calls this directly

Calls 5

decodeMethod · 0.95
CompactMethod · 0.80
getMethod · 0.65
requestMethod · 0.45
EnsureWriteMethod · 0.45

Tested by

no test coverage detected