The sending endpoint.
@see Receiver
# File lib/core/sender.rb, line 67 def delivery_tag @tag_count ||= 0 result = @tag_count.succ @tag_count = result return "#{result}" end
Signals the availability of deliveries.
@param n [Integer] The number of deliveries potentially available.
# File lib/core/sender.rb, line 38 def offered(n) Cproton.pn_link_offered(@impl, n) end
Sends the specified data to the remote endpoint.
@param object [Object] The content to send. @param tag [Object] The tag
@return [Integer] The number of bytes sent.
# File lib/core/sender.rb, line 49 def send(object, tag = nil) if object.respond_to? :proton_send object.proton_send(self, tag) else stream(object) end end
Send the specified bytes as part of the current delivery.
@param bytes [Array] The bytes to send.
@return [Integer] The number of bytes sent.
# File lib/core/sender.rb, line 63 def stream(bytes) Cproton.pn_link_send(@impl, bytes) end