3b4a4958fb521903ebe9b5e4ff72c228dd0a7136
[prosody.git] / doc / session.txt
1 \r
2 Structure of a session:\r
3 \r
4 \r
5 session {\r
6         -- properties --\r
7         conn -- the tcp connection\r
8         notopen -- true if stream has not been initiated, removed after receiving <stream:steam>\r
9         priority -- the resource priority, default: 0\r
10         type -- the connection type. Valid values include:\r
11                         -- "c2s_unauthed" - connection has not been authenticated yet\r
12                         -- "c2s" - from a local client to the server\r
13         username -- the node part of the client's jid (not defined before auth)\r
14         host -- the host part of the client's jid (not defined before stream initiation)\r
15         resource -- the resource part of the client's full jid (not defined before resource binding)\r
16         \r
17         -- methods --\r
18         send(x) -- converts x to a string, and writes it to the connection\r
19 }