Class | Qpid::Proton::Receiver |
In: |
lib/core/receiver.rb
|
Parent: | Link |
PROTON_METHOD_PREFIX | = | "pn_link" | @private |
Allows receiving up to the specified limit of data from the remote endpoint.
Note that large messages can be streamed across the network, so just because there is no data to read does not imply the message is complete.
To ensure the entirety of the message data has been read, either call receive until nil is returned, or verify that partial? is false and Delivery#pending is 0.
@param limit [Fixnum] The maximum bytes to receive.
@return [Fixnum, nil] The number of bytes received, or nil if the end of the stream was reached.t
@see Deliver#pending To see how much buffer space is needed.
@raise [LinkError] If an error occurs.