class XMPP::Router

Defined in:

xmpp/router.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def iq(handler : Callback) #

[View source]
def iq(&handler : Callback) #

[View source]
def match(p : Stanza::Packet) #

[View source]
def message(handler : Callback) #

[View source]
def message(&handler : Callback) #

[View source]
def on(name : String, &handler : Callback) #

on registers a new route with a matcher for a given packet name (iq, message, presence)


[View source]
def on(name : String, handler : Callback) #

[View source]
def presence(handler : Callback) #

[View source]
def presence(&handler : Callback) #

[View source]
def route(&handler : Callback) #

route register an empty routes


[View source]
def route(handler : Callback) #

[View source]
def when(*type : String, &handler : Callback) #

when registers a new route with a matcher for a given packet type


[View source]
def when(*type : String, handler : Callback) #

[View source]