/** * Sends a fragment of a complete message. * * @param fragment the textual fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendText(String fragment, boolean last) { checkConnectedState(); return protocolHandler.stream(last, fragment); }
/** * Sends a fragment of a complete message. * * @param fragment the textual fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendText(String fragment, boolean last) { checkConnectedState(); return protocolHandler.stream(last, fragment); }
/** * Sends a fragment of a complete message. * * @param bytes the binary fragment to send. * @param off the offset within the fragment to send. * @param len the number of bytes of the fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendBinary(byte[] bytes, int off, int len, boolean last) { checkConnectedState(); return protocolHandler.stream(last, bytes, off, len); }
/** * Sends a fragment of a complete message. * * @param bytes the binary fragment to send. * @param off the offset within the fragment to send. * @param len the number of bytes of the fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendBinary(byte[] bytes, int off, int len, boolean last) { checkConnectedState(); return protocolHandler.stream(last, bytes, off, len); }