Skip to content

Commit

Permalink
Replaced Deprecated WebSocket Constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Sep 5, 2022
1 parent 5ceb334 commit 723bd5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bHapticsLib/Internal/WebSocketConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ internal WebSocketConnection(bHapticsConnection parent)
Parent = parent;

string URL = $"ws://{parent.IPAddress}:{bHapticsConnection.Port}/{bHapticsConnection.Endpoint}?app_id={parent.ID}&app_name={parent.Name}";
Socket = new WebSocket(URL, false);
Socket = new WebSocket(URL, new WebSocketConfiguration()
{
AutoConnect = false,
UseAutomaticReceiveThread = true
});

Socket.TextReceived += (txt) =>
{
Expand Down

0 comments on commit 723bd5c

Please sign in to comment.