class Sessions(object):
A list of the sessions that a Reven server tracks.
The links generated e.g. by displaying a Transition in a Jupyter Notebook will send events to all the clients listening to the currently tracked sessions.
Warnings
This object is not meant to be constructed directly. Use RevenServer.sessions
instead.
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | active |
A generator of the sessions to which at least one client is currently connected. |
Method | available |
A generator of the sessions known to the server. |
Method | publish |
Send the passed address to all clients that are listening to the currently tracked sessions. |
Method | publish |
Send the passed transition to all clients that are listening to the currently tracked sessions. |
Method | tracked |
Undocumented |
Property | tracked |
Property: The list of the currently tracked sessions. |
Method | _js |
Undocumented |
Method | _js |
Undocumented |
Method | _publish |
Undocumented |
Method | _publish |
Undocumented |
Class Variable | _instances |
Undocumented |
Instance Variable | _rvn |
Undocumented |
Instance Variable | _sessions |
Undocumented |
A generator of the sessions to which at least one client is currently connected.
Information
Returns | |
a generator of Session objects |
Send the passed address to all clients that are listening to the currently tracked sessions.
The size and addr_name values, if provided, override the name and size values of the address' formatter. The actual response of the clients to this event is client-specific. In Axion, the published address will open an hexdump widget.
Examples
>>> # Publish address LogicalAddress(0x180, reven2.arch.x64.gs) to clients >>> reven_server.sessions.publish_address(reven2.address.LogicalAddress(0x180, reven2.arch.x64.gs)) True
Information
Parameters | |
address | The reven2.address.LogicalAddress , reven2.address.LogicalAddressSegmentIndex or reven2.address.LinearAddress to send. |
size | the size of the address, this value is e.g. used in axion to customize display mode in the hexdump, if None the address's default formatter size is used. |
address | String, is e.g. used in axion to name the hexdump, if None the address's default formatter name is used. |
address | The reven2.MemoryRange to send. address and size must be None if this parameter is used. |
Returns | |
True if there were some clients listening, False otherwise. |
Send the passed transition to all clients that are listening to the currently tracked sessions.
The actual response of the clients to this event is client-specific. In Axion, the published transition will be selected.
Examples
>>> # Publish transition #100 to clients >>> reven_server.sessions.publish_transition(reven_server.trace.transition(100)) True
Information
Parameters | |
transition | The reven2.trace.Transition to send. |
Returns | |
True if there were some clients listening, False otherwise. |
tracked =
Property: The list of the currently tracked sessions.
Examples
>>> # Access the list of currently tracked sessions >>> reven_server.sessions.tracked [Session('default', 1)]
>>> # Only track session 'axion' going forward >>> reven_server.sessions.tracked = 'axion' >>> reven_server.sessions.tracked [Session('axion', 0)]
>>> # Add back the default session >>> reven_server.sessions.tracked.append("default") >>> reven_server.sessions.tracked [Session('axion', 0), Session('default', 1)]
>>> # Follow all available sessions >>> reven_server.sessions.tracked = reven_server.sessions.available() >>> reven_server.sessions.tracked [Session('test', 4), Session('default', 1), Session('axion', 0)]