Produits Support Open Source Company
 
 
 
Home > Wiki > ejabberd sm

Article - Talk ejabberd sm

Return the list of ejabberd core modules

Session manager (ejabberd_sm)

Handle the currently opened sessions.

This module routes packets to local users. It determines which user resource the packet must be sent via the presence table. If this resource is connected to this node, it is routed to the C2S manager. If it’s connected via another node, then the packet is sent to the session manager on that node.

API

get_user_resources/2

get_user_resources(UserServer)
User Server string() 

Returns all the resources of a connected user.

dirty_get_sessions_list/0

dirty_get_sessions_list() -> [JID]
JID {UsernameHostResource}
Username Host Resource string() 

Returns the JID of all opened sessions.

get_vh_session_list/0

get_vh_session_list(Host) -> [JID]
JID {UsernameHostResource}
Username Host Resource string() 

Returns the JID of all opened sessions on a virtual host.

dirty_get_my_sessions_list/0

dirty_get_my_sessions_list() -> [{SIDJIDUserPriority}]
SID {Timepid()}
Time {MegaSecsSecsMicroSecs} (see erlang:now/0)
JID {UsernameHostResource}
User {UsernameHost}
Username Host Resource string()
Priority integer() 

Returns all the opened sessions.
The second element of SID is the PID of the opened connection.

 
 
 
Valid HTML 4.01!   Valid CSS!