Sender.send

Sends some data for the current delivery. The application may call this method multiple times for the same delivery.

@param bytes the byte array containing the data to be sent. @param offset the offset into the given array to start reading. @param length the number of bytes to read from the given byte array.

@return the number of bytes accepted

TODO Proton-j current copies all the bytes it has been given so the return value will always be length. Should this be changed? How does Proton-c behave? What should the application do if the number of bytes accepted is smaller than length.

  1. int send(byte[] bytes, int offset, int length)
    interface Sender
    int
    send
    (
    byte[] bytes
    ,
    int offset
    ,
    int length
    )
  2. int send(ReadableBuffer buffer)

Meta