- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Message relay based on ns_connchan
Class Relations
Methods (to be applied on the object)
can_be_used (scripted, public)
xo::mr::connchan can_be_used
ns_connchan can be used on every recent NaviServer.
- Testcases:
- No testcase defined.
send_to_subscriber (scripted, public)
xo::mr::connchan send_to_subscriber key msg
Write directly to the subscribers from the connection thread via ns_connchan. It would be possible, to perform asynchronous operations via "ns_connchan callback", which would be handled in the background. Not sure, this is necessary.
- Parameters:
- key (required)
- msg (required)
- Testcases:
- No testcase defined.
subscribe (scripted, public)
xo::mr::connchan subscribe [ -initmsg initmsg ] [ -mode mode ] key
ns_log notice "#### [self] subscribe $key mode $mode" Unplug the connection channel from the current connection thread. The currently unplugged channels can be queried via "ns_connchan list"
- Switches:
- -initmsg (optional)
- -mode (optional)
- Parameters:
- key (required)
- Testcases:
- No testcase defined.
sweep (scripted, public)
xo::mr::connchan sweep key
For the time being, do nothing. Since the chat is verbose on logins/logouts, write operations will fail, in which case the array is cleaned up. If this is not sufficient, probably a "ns_connchan eof" operation would be useful.
- Parameters:
- key (required)
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables