Class Jabber::Protocol::Connection
|
|
The connection class encapsulates the connection to the Jabber service including managing the socket
and controlling the parsing of the Jabber
add_filter,
close,
connect,
delete_filter,
is_connected?,
is_disconnected?,
new,
on_connection_exception,
parse_failure,
poll,
receive,
send,
[R] |
:host |
|
[R] |
:input |
|
[R] |
:output |
|
[R] |
:port |
|
[R] |
:status |
|
Connects to the Jabber server through a TCP
Socket and starts the Jabber parser.
Mounts a block to handle exceptions if they occur during the poll send.
This will likely be the first indication that the socket dropped in a Jabber Session.
Returns if this connection is connected to a Jabber service
Returns if this connection is NOT connected to a Jabber service
Processes a received ParsedXMLElement
and executes registered thread blocks and filters against it.
Sends XML data to the socket and (optionally) waits to process received
data.
xml: | [String] The xml data to send
|
proc: | [Proc = nil] The optional proc
|
&block: | [Block] The optional block
|
Starts a polling thread to send "keep alive" data to prevent the
Jabber connection from closing for
inactivity.
Adds a filter block/proc to process received XML messages
xml: | [String] The xml data to send
|
proc: | [Proc = nil] The optional proc
|
&block: | [Block] The optional block
|
Closes the connection to the Jabber service