class XMPP::Component

Included Modules

Defined in:

xmpp/component.cr

Constructors

Instance Method Summary

Instance methods inherited from module XMPP::EventManager

event_handler : EventHandler | Nil event_handler, event_handler=(event_handler : EventHandler | Nil) event_handler=

Instance methods inherited from module XMPP::StreamClient

connect connect, disconnect disconnect, event_handler=(handler : EventHandler) event_handler=, resume(state : SMState) resume

Instance methods inherited from module XMPP::Sender

send(packet : String)
send(packet : Stanza::Packet)
send

Constructor Detail

def self.new(options : XMPP::ComponentOptions, router : XMPP::Router) #

[View source]

Instance Method Detail

def connect #

connect triggers component connection to XMPP server component port.


[View source]
def disconnect #

[View source]
def options : ComponentOptions #

[View source]
def resume(state : SMState) #

[View source]
def send(packet : String) #

send sends an XMPP stanza as a string to the server. It can be invalid XML or XMPP content. In that case, the server will disconnect the client. It is up to the user of this method to carefully craft the XML content to produce valid XMPP.


[View source]
def send(packet : Stanza::Packet) #

sends marshal's XMPP stanza and sends it to the server.


[View source]