Skip to content

Val Socket Setup Guide

Danger

The socket does not have any datatypes built in, it returns the json data that valorant intended you must parse by yourself!

Step 1: Initialize RadiantConnect

Initialize the RadiantConnect library by creating an instance of the Initiator class.

C#
1
Initiator Init = new Initiator();

Step 2: Initialize ValSocket

Initialize the Socket library for usage.

C#
1
ValSocket socket = new(ValorantNet.GetAuth(), init);

Step 3: Initialize the socket connection

This will begin the actual socket connection as well as subscribing to all the events

C#
1
socket.InitializeConnection();

Step 4: Subscribe to the OnNewMessage event

This is where you'll receive the messages

C#
1
2
3
4
socket.OnNewMessage += (data) =>
{
    Debug.WriteLine($"Socket Message: {data}");
};

Step 5: Profit

In the end it should look something like this example

C#
1
2
3
4
5
6
7
Initiator init = new();
ValSocket socket = new(ValorantNet.GetAuth()!, init);
socket.InitializeConnection();
socket.OnNewMessage += (data) =>
{
    Debug.WriteLine($"Socket Message: {data}");
};