Software /
code /
prosody
Comparison
doc/session.txt @ 7535:4a3a3098d9bb
doc/session: As far as I remember, sessions have had a close method, not disconnect
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 03 Aug 2016 19:22:01 +0200 |
parent | 199:eccf66b42bd7 |
child | 8728:41c959c5c84b |
comparison
equal
deleted
inserted
replaced
7534:ba782a093b14 | 7535:4a3a3098d9bb |
---|---|
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 close(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" (all available resources are connected resources) | 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" (all interested resources are connected resources) | 28 if session.interested then this is an "interested resource" (all interested resources are connected resources) |