12 username -- the node part of the client's jid (not defined before auth) |
12 username -- the node part of the client's jid (not defined before auth) |
13 host -- the host part of the client's jid (not defined before stream initiation) |
13 host -- the host part of the client's jid (not defined before stream initiation) |
14 resource -- the resource part of the client's full jid (not defined before resource binding) |
14 resource -- the resource part of the client's full jid (not defined before resource binding) |
15 full_jid -- convenience for the above 3 as string in username@host/resource form (not defined before resource binding) |
15 full_jid -- convenience for the above 3 as string in username@host/resource form (not defined before resource binding) |
16 priority -- the resource priority, default: 0 (not defined before initial presence) |
16 priority -- the resource priority, default: 0 (not defined before initial presence) |
|
17 presence -- the last non-directed presence. initially nil. |
|
18 interested -- true if the resource requested the roster. Interested resources recieve roster updates. Initially nil. |
17 |
19 |
18 -- methods -- |
20 -- methods -- |
19 send(x) -- converts x to a string, and writes it to the connection |
21 send(x) -- converts x to a string, and writes it to the connection |
20 disconnect(x) -- Disconnect the user and clean up the session, best call sessionmanager.destroy_session() instead of this in most cases |
22 disconnect(x) -- Disconnect the user and clean up the session, best call sessionmanager.destroy_session() instead of this in most cases |
21 } |
23 } |
|
24 |
|
25 A session is a "connected resource" |
|
26 if session.presence then this is an "available resource" |
|
27 if session.interested then this is an "interested resource" |