public Task SendPushTokenResponse(PushTokenResult result, IServiceRemoteRequest request) { try { if (request is ServiceRemoteRequest remoteRequest) { var connection = remoteRequest.GetClientConnection(); if (connection != null) { _ = connection.Send(new ClientPushTokenResponseMessage(result, request.RequestCode) { SignKey = _configuration.LocaleNodePrivateKey }); } } } catch (Exception ex) { Log.IgnoreException(ex); } return(Task.CompletedTask); }
protected override void Unpack(Unpacker unpacker) { base.Unpack(unpacker); Result = (PushTokenResult)unpacker.UnpackUshort(); }
public ClientPushTokenResponseMessage(PushTokenResult result, long requestCode) : this() { SetRequestCode(requestCode); Result = result; }