diff --git a/Capy64/Runtime/Libraries/HTTP.cs b/Capy64/Runtime/Libraries/HTTP.cs index 45ac6ee..30c3030 100644 --- a/Capy64/Runtime/Libraries/HTTP.cs +++ b/Capy64/Runtime/Libraries/HTTP.cs @@ -18,7 +18,7 @@ public class HTTP : IPlugin private static IGame _game; private static HttpClient _httpClient; private static long _requestId; - public static readonly HashSet WebSocketConnections = new(); + public static readonly HashSet WebSocketConnections = new(); public static readonly string UserAgent = $"Capy64/{Capy64.Version}"; @@ -332,7 +332,7 @@ public class HTTP : IPlugin await task; - var handle = new WebSocketHandle(wsClient, requestId); + var handle = new WebSocketClient(wsClient, requestId); WebSocketConnections.Add(handle); _game.LuaRuntime.QueueEvent("websocket_connect", LK => diff --git a/Capy64/Runtime/Objects/Handlers/WebSocketHandle.cs b/Capy64/Runtime/Objects/Handlers/WebSocketClient.cs similarity index 89% rename from Capy64/Runtime/Objects/Handlers/WebSocketHandle.cs rename to Capy64/Runtime/Objects/Handlers/WebSocketClient.cs index d6a6a91..29591b6 100644 --- a/Capy64/Runtime/Objects/Handlers/WebSocketHandle.cs +++ b/Capy64/Runtime/Objects/Handlers/WebSocketClient.cs @@ -7,12 +7,12 @@ using System.Threading; namespace Capy64.Runtime.Objects.Handlers; -public class WebSocketHandle +public class WebSocketClient { public const string ObjectType = "WebSocketClient"; private readonly ClientWebSocket _socket; private readonly long _requestId; - public WebSocketHandle(ClientWebSocket socket, long requestId) + public WebSocketClient(ClientWebSocket socket, long requestId) { _socket = socket; _requestId = requestId; @@ -57,7 +57,7 @@ public class WebSocketHandle { var L = Lua.FromIntPtr(state); - var client = L.CheckObject(1, ObjectType, false); + var client = L.CheckObject(1, ObjectType, false); L.PushInteger(client._requestId); @@ -68,7 +68,7 @@ public class WebSocketHandle { var L = Lua.FromIntPtr(state); - var client = L.CheckObject(1, ObjectType, false); + var client = L.CheckObject(1, ObjectType, false); var data = L.CheckBuffer(2); @@ -84,7 +84,7 @@ public class WebSocketHandle { var L = Lua.FromIntPtr(state); - var client = L.CheckObject(1, ObjectType, true); + var client = L.CheckObject(1, ObjectType, true); if (client is null || client._socket.State == WebSocketState.Closed) return 0;