TCPCallbackDelegate


Description:

[ CCode ( has_target = false ) ]
public delegate void TCPCallbackDelegate (CallerInfo caller, TCPRequest tcprequest, out RPCDispatcher? rpcdispatcher, out uchar[] data, out uchar[] response)

This callback is used to interpret a request. It is called this way:
| rpcdispatcher, data, response = self.callback(caller, data_request)
where the arguments are:
| caller: a CallerInfo instance.
| data_request: what has been read from socket as a request.
and the results are:
| rpcdispatcher: if not None, we must do the call to the remotable method:
| rpcdispatcher.marshalled_dispatch(caller, data)
| response: if rpcdispatcher is None and response is not None then send response.
| if rpcdispatcher is None and response is None then do nothing.

Parameters:

caller a CallerInfo instance
tcprequest what has been read from socket as a request.
rpcdispatcher Return value: If not None, need to call rpcdispatcher.marshalled_dispatch(caller, data)
data Return value: the data
response Return value: If rpcdispatcher is None and response is not None send response.if both rpcdispatcher and response are None, do nothing

Namespace: Ntk.Core
Package: vd