MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / send

Method send

src/main/java/core/packetproxy/DuplexSync.java:72–85  ·  view source on GitHub ↗
(byte[] data)

Source from the content-addressed store, hash-verified

70 }
71
72 @Override
73 public void send(byte[] data) throws Exception {
74 int accepted_length = callOnClientPacketReceived(data);
75 if (accepted_length <= 0) {
76
77 return;
78 }
79 byte[] accepted = ArrayUtils.subarray(data, 0, accepted_length);
80
81 byte[] decoded = super.callOnClientChunkReceived(accepted);
82 byte[] encoded = super.callOnClientChunkSend(decoded);
83 out.write(encoded);
84 out.flush();
85 }
86
87 @Override
88 public byte[] receive() throws Exception {

Callers 1

createConnectionMethod · 0.95

Calls 4

callOnClientChunkSendMethod · 0.80
writeMethod · 0.65

Tested by

no test coverage detected