/** * Prepends a 4-byte length field to the given bytes, and passes the result to the {@linkplain * FilterListener#sendUnfiltered sendUnfiltered} method of the callback for this harness. * * @param bytes the data to process */ public void send(byte[] bytes) { filter.filterSend(testingCallback, bytes); }
/** * Adds the data in {@code buf} to the message filter and processes the bytes received so far, * dispatching any complete message to the {@linkplain FilterListener#filteredMessageReceived * filteredMessageReceived} method of the callback for this harness. * * @param buf the data to add and process */ public void recv(ByteBuffer buf) { filter.filterReceive(testingCallback, buf); }