# IRpcConnection Interface

Namespace: [Qlik.Sense.JsonRpc](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.htm)  
Assembly: Qlik.Sense.JsonRpc.dll

RpcConnection is responsible for handling the JsonRpc traffic to and from a a Qlik Sense instance.

## Syntax

```
public interface IRpcConnection : IDisposable
```

## Properties

| Name | Description |
| --- | --- |
| [ConnectionState](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.ConnectionState.htm#Qlik_Sense_JsonRpc_IRpcConnection_ConnectionState) | Indicates session connection status. Can be used to identify if the connection resulted in the creation of a new session or if it attached to an already existing session. |

## Methods

| Name | Description |
| --- | --- |
| [Deserialize<T>(JToken)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.Deserialize.htm#Qlik_Sense_JsonRpc_IRpcConnection_Deserialize__1_Newtonsoft_Json_Linq_JToken_) | Deserialize a token to a specific type. |
| [Log(String, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.Log.htm#Qlik_Sense_JsonRpc_IRpcConnection_Log_System_String_System_String_) | Post message to the DebugConsole. If no debug console is active, then the method has no effect. |
| [SendAsync(Request)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.SendAsync.htm#Qlik_Sense_JsonRpc_IRpcConnection_SendAsync_Qlik_Sense_JsonRpc_Request_) | Sends a request asynchronously to a Qlik Sense instance. |
| [SendAsync<T>(Request, Func<Response, T>)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.SendAsync.htm#Qlik_Sense_JsonRpc_IRpcConnection_SendAsync__1_Qlik_Sense_JsonRpc_Request_System_Func_Qlik_Sense_JsonRpc_Response___0__) | Sends a request asynchronously to a Qlik Sense instance with a specified response handler. |

## Events

| Name | Description |
| --- | --- |
| [CommunicationErrorEvent](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.CommunicationErrorEvent.htm) | Event that fires when an exception occurs on the web socket or the socket is<br>unexpectedly closed by the server. |
| [ConnectionClosingEvent](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.ConnectionClosingEvent.htm) | Event that fires when a connection closes. |
| [PushMessageEvent](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.PushMessageEvent.htm) | Will catch all responses without registered receiver |
| [PushMethodReceivedEvent](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.PushMethodReceivedEvent.htm) | Event that is fired whenever a push method is received from Qlik Sense. |
| [ResponseEvent](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IRpcConnection.ResponseEvent.htm) | Event that is fired when a response is received on the web socket. |