Comparison

doc/session.txt @ 116:72e698cdabd7

Updated and fixed session documentation
author Waqas Hussain <waqas20@gmail.com>
date Thu, 23 Oct 2008 02:19:26 +0500
parent 115:db048883a522
child 199:eccf66b42bd7
comparison
equal deleted inserted replaced
115:db048883a522 116:72e698cdabd7
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. 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. 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 20
20 -- methods -- 21 -- methods --
21 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
22 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
23 } 24 }
24 25
25 A session is a "connected resource" 26 if session.full_jid (also session.roster and session.resource) then this is a "connected resource"
26 if session.presence then this is an "available resource" 27 if session.presence then this is an "available resource"
27 if session.interested then this is an "interested resource" 28 if session.interested then this is an "interested resource"