Class: Qpid::Proton::Sender
Overview
The sending endpoint.
Constant Summary
Constants inherited from Link
Link::RCV_FIRST, Link::RCV_SECOND, Link::SND_MIXED, Link::SND_SETTLED, Link::SND_UNSETTLED
Constants inherited from Endpoint
Endpoint::LOCAL_ACTIVE, Endpoint::LOCAL_CLOSED, Endpoint::LOCAL_MASK, Endpoint::LOCAL_UNINIT, Endpoint::REMOTE_ACTIVE, Endpoint::REMOTE_CLOSED, Endpoint::REMOTE_MASK, Endpoint::REMOTE_UNINIT
Instance Attribute Summary
Attributes inherited from Link
#available, #credit, #name, #queued, #receiver?, #remote_credit, #sender?, #state
Instance Method Summary collapse
- #delivery_tag ⇒ Object
-
#offered(n) ⇒ Object
Signals the availability of deliveries.
-
#send(object, tag = nil) ⇒ Fixnum
Sends the specified data to the remote endpoint.
-
#stream(bytes) ⇒ Object
Send the specified bytes as part of the current delivery.
Methods inherited from Link
#==, #advance, #close, #connection, #current, #delivery, #detach, #drained, #error, #next, #open, #rcv_settle_mode, #rcv_settle_mode=, #remote_source, #remote_target, #session, #snd_settle_mode, #snd_settle_mode=, #source, #target
Methods inherited from Endpoint
#check_state, #handler, #handler=, #local_active?, #local_closed?, #local_uninit?, #remote_active?, #remote_closed?, #remote_uninit?, #transport
Instance Method Details
#delivery_tag ⇒ Object
67 68 69 70 71 72 |
# File 'lib/core/sender.rb', line 67 def delivery_tag @tag_count ||= 0 result = @tag_count.succ @tag_count = result return "#{result}" end |
#offered(n) ⇒ Object
Signals the availability of deliveries.
38 39 40 |
# File 'lib/core/sender.rb', line 38 def offered(n) Cproton.pn_link_offered(@impl, n) end |
#send(object, tag = nil) ⇒ Fixnum
Sends the specified data to the remote endpoint.
49 50 51 52 53 54 55 |
# 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 |
#stream(bytes) ⇒ Object
Send the specified bytes as part of the current delivery.
63 64 65 |
# File 'lib/core/sender.rb', line 63 def stream(bytes) Cproton.pn_link_send(@impl, bytes) end |