Change ingoing message path to reroute through serversession.data_in before calling the inputfuncs. This allows users to view all incoming data in one place if they want to do eventual pre-processing. Resolves #1163.
This commit is contained in:
parent
44bd403cc8
commit
a403cc9576
2 changed files with 33 additions and 4 deletions
|
|
@ -691,7 +691,22 @@ class ServerSessionHandler(SessionHandler):
|
|||
|
||||
def data_in(self, session, **kwargs):
|
||||
"""
|
||||
Data Portal -> Server.
|
||||
We let the data take a "detour" to session.data_in
|
||||
so the user can override and see it all in one place.
|
||||
That method is responsible to in turn always call
|
||||
this class' `sessionhandler.call_inputfunc` with the
|
||||
(possibly processed) data.
|
||||
|
||||
"""
|
||||
if session:
|
||||
session.data_in(**kwargs)
|
||||
|
||||
def call_inputfuncs(self, session, **kwargs):
|
||||
"""
|
||||
Split incoming data into its inputfunc counterparts.
|
||||
This should be called by the serversession.data_in
|
||||
as sessionhandler.call_inputfunc(self, **kwargs).
|
||||
|
||||
We also intercept OOB communication here.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue