# RemotePlay.Client

{% hint style="success" %}

#### Like what your seeing?

Support us as a [GitHub Sponsor](/old-kb/where-to-buy/become-a-sponsor.md) and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude.\
\
These articles are made possible by our [GitHub Sponsors](/old-kb/where-to-buy/become-a-sponsor.md) ... become a sponsor today!
{% endhint %}

## &#x20;Introduction

```csharp
using RemotePlay = HeathenEngineering.SteamworksIntegration.API.RemotePlay.Client;
```

```csharp
public static class RemotePlay.Client
```

### What can it do?

Functions that provide information about Steam Remote Play sessions, streaming your game content to another computer or to a Steam Link app or hardware.

## Events

### Session Connected

Called when a session connects

```csharp
public static SteamRemotePlaySessionConnectedEvent EventSessionConnected;
```

The handler would take the form

```csharp
void Handler(SteamRemotePlaySessionConnected_t responce)
{
    //Do Work
}
```

### Session Disconnected

Called when a session disconnects

```csharp
public static SteamRemotePlaySessionDisconnectedEvent EventSessionDisconnected;
```

The handler would take the form

```csharp
void Handler(SteamRemotePlaySessionDisconnected_t responce)
{
    //Do Work
}
```

## How To

### Get Session Counts

Get the number of currently connected sessions

```csharp
var count = API.RemotePlay.Client.GetSessionCounts();
```

### Get Sessions

Get the collection of current remote play sessions

```csharp
var sessions = API.RemotePlay.Client.GetSessions();
```

### Get Session User

Gets the user data of the connected session user

```csharp
var user = API.RemotePlay.Client.GetSessionUser(session);
```

### Get Session Client Name

Gets the name of the session client device

```csharp
var name = API.RemotePlay.Client.GetSessionClientName(session);
```

### Get Session Client Formfactor

Gets the formfactor of the connected session

```csharp
var formfactor = API.RemotePlay.Client.GetSessionClientFormFactor(session);
```

### Get Session Client Resolution

Get the resolution of the connected session

```csharp
var resolution = API.RemotePlay.Client.GetSessionClientResolution(session);
```

### Send Invite

Invite a friend to join the game using remote play together

```csharp
if(API.RemotePlayClient.SendInvite(user))
    Debug.Log("Done");
else
    Debug.Log("Send failed");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.heathen.group/old-kb/old-toolkit-for-steamworks/unity/api-extensions/remoteplay.client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
