Skip to content
uistler edited this page Apr 10, 2013 · 1 revision

set_session(_app, _session_id)

_app {string} - app slug

_session_id {string} - unique id

Sets main Session/Room that used for communications

add_session(_session_id, member_data)

_session_id {string} - room name

member_data {Object} - client identification data

Connect to additional session.

If passed member_data starts listing other joins and disconnects. Notifies other members about new member.

remove_session(_session_id)

_session_id {string} - unique id

Removes member from the room, notify others if previously passed member_data argument to add_session methods.

send_code(data, _session_id)

data {Object} - data to send _session_id - unique id

Sends data in room, all room members will receive it.