Comparison

doc/session.txt @ 199:eccf66b42bd7

Added resource priority handling, etc
author Waqas Hussain <waqas20@gmail.com>
date Sun, 02 Nov 2008 06:36:42 +0500
parent 116:72e698cdabd7
child 7535:4a3a3098d9bb
comparison
equal deleted inserted replaced
193:13ac34255c37 199:eccf66b42bd7
11 -- "c2s" - from a local client to the server 11 -- "c2s" - from a local client to the server
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
17 presence -- the last non-directed presence. initially nil. 17 presence -- the last non-directed presence with no type attribute. initially nil. reset to nil on unavailable presence.
18 interested -- true if the resource requested the roster. Interested resources recieve roster updates. Initially nil. 18 interested -- true if the resource requested the roster. Interested resources recieve roster updates. Initially nil.
19 roster -- the user's roster. Loaded as soon as the resource is bound (session becomes a connected resource). 19 roster -- the user's roster. Loaded as soon as the resource is bound (session becomes a connected resource).
20 20
21 -- methods -- 21 -- methods --
22 send(x) -- converts x to a string, and writes it to the connection 22 send(x) -- converts x to a string, and writes it to the connection
23 disconnect(x) -- Disconnect the user and clean up the session, best call sessionmanager.destroy_session() instead of this in most cases 23 disconnect(x) -- Disconnect the user and clean up the session, best call sessionmanager.destroy_session() instead of this in most cases
24 } 24 }
25 25
26 if session.full_jid (also session.roster and session.resource) then this is a "connected resource" 26 if session.full_jid (also session.roster and session.resource) then this is a "connected resource"
27 if session.presence then this is an "available resource" 27 if session.presence then this is an "available resource" (all available resources are connected resources)
28 if session.interested then this is an "interested resource" 28 if session.interested then this is an "interested resource" (all interested resources are connected resources)