Sha256: 585c579c042879f07a9b315f848f712168ee929cf7e6f56559970369cba5a89a
Contents?: true
Size: 422 Bytes
Versions: 9
Compression:
Stored size: 422 Bytes
Contents
module EMJack module Handler class Watching RESPONSE = /^WATCHING\s+(\d+)\r\n/ def self.handles?(response) response =~ RESPONSE end def self.handle(deferrable, response, body, conn=nil) return false unless response =~ RESPONSE deferrable.succeed($1.to_i) true end EMJack::Connection.register_handler(EMJack::Handler::Watching) end end end
Version data entries
9 entries across 9 versions & 1 rubygems