/** * Receives a byte array. * Will block until data is available! * * @return received byte array. */ public byte[] recv() { return getNextMessage(); }
/** * Receive the next message and encode into string. * Will block until message is available! * Used only for testing. * * @return string respresentation of the message * @throws Exception */ public String recvStr() throws Exception { return new String(getNextMessage(), StandardCharsets.UTF_8); }
nextStep = processMessage(subscriber.getNextMessage()); while (nextStep == Action.CONTINUE) { nextStep = processMessage(subscriber.getNextMessage());