public void HandleOneWay(IntPtr nativeClientId, NativeServiceCommunication.IFabricServiceCommunicationMessage message) { var body = Helper.Get_Byte(message.Get_Body()); var headers = Helper.Get_Byte(message.Get_Headers()); var clientId = NativeTypes.FromNativeString(nativeClientId); var context = new FabricTransportRequestContext(clientId, this.nativeConnectionHandler.GetCallBack); this.service.HandleOneWay(context, headers, body); }
private async Task <FabricServiceCommunicationMessage> RequestResponseAsync(string clientId, byte[] header, byte[] body, TimeSpan timeout) { // We have Cancellation Token for Remoting layer , hence timeout is not used here. var context = new FabricTransportRequestContext(clientId, this.nativeConnectionHandler.GetCallBack); byte[] replyheader = null; byte[] replyBody = null; var replyMessage = await this.service.RequestResponseAsync(context, header, body); if (replyMessage.IsException) { replyheader = replyMessage.GetBody(); replyBody = null; } else { replyheader = null; replyBody = replyMessage.GetBody(); } return(new FabricServiceCommunicationMessage(replyheader, replyBody)); }