Sha256: c61a55bafde0127e500e5bb8c93951686848b76dcd0e1ebc1d03d2e0b2fbc49b
Contents?: true
Size: 515 Bytes
Versions: 11
Compression:
Stored size: 515 Bytes
Contents
#!/usr/bin/env ruby require 'blather' trap(:INT) { EM.stop } trap(:TERM) { EM.stop } EM.run do Blather::Stream::Client.start(Class.new { attr_accessor :jid def post_init(stream, jid = nil) @stream = stream self.jid = jid @stream.send_data Blather::Stanza::Presence::Status.new puts "Stream started!" end def receive_data(stanza) @stream.send_data stanza.reply! end def unbind puts "Stream ended!" end }.new, 'echo@jabber.local', 'echo') end
Version data entries
11 entries across 11 versions & 2 rubygems