Пример #1
0
        void RequestInternal <TResponse, TRequest>(string route, TRequest msg, int timeout, IPitayaSerializer serializer, Action <TResponse> action, Action <PitayaError> errorAction)
        {
            _reqUid++;

            Action <byte[]> responseAction = res => { action(serializer.Decode <TResponse>(res)); };

            _eventManager.AddCallBack(_reqUid, responseAction, errorAction);

            _binding.Request(_client, route, serializer.Encode(msg), _reqUid, timeout);
        }
Пример #2
0
 private void NotifyInternal(string route, object msg, IPitayaSerializer serializer, int timeout = -1)
 {
     _binding.Notify(_client, route, serializer.Encode(msg), timeout);
 }