lib/onstomp/interfaces/connection_events.rb in onstomp-1.0.0pre1 vs lib/onstomp/interfaces/connection_events.rb in onstomp-1.0.0

- old
+ new

@@ -40,12 +40,12 @@ # @endgroup # Triggers a connection specific event. # @param [Symbol] event name - def trigger_connection_event event - trigger_event :"on_#{event}", self.client, self + def trigger_connection_event event, msg='' + trigger_event :"on_#{event}", self.client, self, msg end # Takes a hash of event bindings a {OnStomp::Client client} has stored # and binds them to this connection, then triggers +on_established+. # This allows users to add callbacks for @@ -55,8 +55,8 @@ # @see OnStomp::Interfaces::ClientEvents#pending_connection_events def install_bindings_from_client ev_hash ev_hash.each do |ev, cbs| cbs.each { |cb| bind_event(ev, cb) } end - trigger_connection_event :established + trigger_connection_event :established, "STOMP #{self.version} connection negotiated" end end