Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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);
 }