2 Structure of a session:
\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
18 send(x) -- converts x to a string, and writes it to the connection
\r