Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup and refactoring #32

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions samples/ChatApplication/ChatApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WebSocketManager\WebSocketManager.csproj" />
Expand Down
80 changes: 41 additions & 39 deletions samples/ChatApplication/ChatHandler.cs
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
using System.Net.WebSockets;
using Microsoft.AspNetCore.Http;
using System.Net.WebSockets;
using System.Threading.Tasks;
using WebSocketManager;
using WebSocketManager.Common;

namespace ChatApplication
{
public class ChatHandler : WebSocketHandler
public class ChatHandler : WebSocketHandler
{
public ChatHandler(WebSocketConnectionManager webSocketConnectionManager) : base(webSocketConnectionManager)
{
public ChatHandler(WebSocketConnectionManager webSocketConnectionManager) : base(webSocketConnectionManager)
{
}

public override async Task OnConnected(WebSocket socket)
{
await base.OnConnected(socket);

var socketId = WebSocketConnectionManager.GetId(socket);

var message = new Message()
{
MessageType = MessageType.Text,
Data = $"{socketId} is now connected"
};

await SendMessageToAllAsync(message);
}

public async Task SendMessage(string socketId, string message)
{
await InvokeClientMethodToAllAsync("receiveMessage", socketId, message);
}

public override async Task OnDisconnected(WebSocket socket)
{
var socketId = WebSocketConnectionManager.GetId(socket);

await base.OnDisconnected(socket);

var message = new Message()
{
MessageType = MessageType.Text,
Data = $"{socketId} disconnected"
};
await SendMessageToAllAsync(message);
}
}

public override async Task OnConnected(WebSocket socket, HttpContext context)
{
await base.OnConnected(socket, context);

var socketId = WebSocketConnectionManager.GetId(socket);

var message = new Message()
{
MessageType = MessageType.Text,
Data = $"{socketId} is now connected"
};

await SendMessageToAllAsync(message, x => x.Query["age"] == "24");

}

public async Task SendMessage(string socketId, string message)
{
await InvokeClientMethodToAllAsync("receiveMessage", socketId, message);
}

public override async Task OnDisconnected(WebSocket socket)
{
var socketId = WebSocketConnectionManager.GetId(socket);

await base.OnDisconnected(socket);

var message = new Message()
{
MessageType = MessageType.Text,
Data = $"{socketId} disconnected"
};
await SendMessageToAllAsync(message, x => x.Query["age"] == "24");
}
}
}
21 changes: 11 additions & 10 deletions samples/ChatApplication/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@

namespace ChatApplication
{
public class Program
public class Program
{
public static void Main(string[] args)
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.Build();
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();

host.Run();
}
host.Run();
}
}
}
2 changes: 1 addition & 1 deletion samples/ChatApplication/wwwroot/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>This should be mapped to "/chat"</h1>

<script language="javascript" type="text/javascript">

var connection = new WebSocketManager.Connection("ws://" + location.host + "/chat");
var connection = new WebSocketManager.Connection("ws://" + location.host + "/chat?name=SomeUser&age=24");
connection.enableLogging = true;

connection.connectionMethods.onConnected = () => {
Expand Down
6 changes: 3 additions & 3 deletions samples/MvcSample/MvcSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WebSocketManager.Common\WebSocketManager.Common.csproj" />
Expand Down
18 changes: 18 additions & 0 deletions samples/MvcSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,28 @@ public static void Main(string[] args)
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();

host.Run();
}
}
}


/*
*
*
*
* .UseKestrel(c =>
{
c.AddServerHeader = false;
c.NoDelay = true;
// c.ThreadCount = 1000;
})
.UseUrls("http://*:9013")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
*/
100 changes: 50 additions & 50 deletions samples/WebSocketManagerSamples.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26206.0
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatApplication", "ChatApplication\ChatApplication.csproj", "{C64533FC-4066-438D-9297-BDF1150B3F9A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChatApplication", "ChatApplication\ChatApplication.csproj", "{C64533FC-4066-438D-9297-BDF1150B3F9A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EchoConsoleClient", "EchoConsoleClient\EchoConsoleClient.csproj", "{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}"
EndProject
Expand All @@ -27,76 +27,76 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x64.ActiveCfg = Debug|x64
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x64.Build.0 = Debug|x64
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x86.ActiveCfg = Debug|x86
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x86.Build.0 = Debug|x86
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x64.ActiveCfg = Debug|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x64.Build.0 = Debug|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x86.ActiveCfg = Debug|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Debug|x86.Build.0 = Debug|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|Any CPU.Build.0 = Release|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x64.ActiveCfg = Release|x64
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x64.Build.0 = Release|x64
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x86.ActiveCfg = Release|x86
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x86.Build.0 = Release|x86
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x64.ActiveCfg = Release|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x64.Build.0 = Release|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x86.ActiveCfg = Release|Any CPU
{C64533FC-4066-438D-9297-BDF1150B3F9A}.Release|x86.Build.0 = Release|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x64.ActiveCfg = Debug|x64
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x64.Build.0 = Debug|x64
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x86.ActiveCfg = Debug|x86
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x86.Build.0 = Debug|x86
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x64.ActiveCfg = Debug|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x64.Build.0 = Debug|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x86.ActiveCfg = Debug|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Debug|x86.Build.0 = Debug|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|Any CPU.Build.0 = Release|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x64.ActiveCfg = Release|x64
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x64.Build.0 = Release|x64
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x86.ActiveCfg = Release|x86
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x86.Build.0 = Release|x86
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x64.ActiveCfg = Release|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x64.Build.0 = Release|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x86.ActiveCfg = Release|Any CPU
{DDE2DC69-2CD5-4C4F-98D3-3609942A6E63}.Release|x86.Build.0 = Release|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x64.ActiveCfg = Debug|x64
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x64.Build.0 = Debug|x64
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x86.ActiveCfg = Debug|x86
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x86.Build.0 = Debug|x86
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x64.ActiveCfg = Debug|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x64.Build.0 = Debug|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x86.ActiveCfg = Debug|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Debug|x86.Build.0 = Debug|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|Any CPU.Build.0 = Release|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x64.ActiveCfg = Release|x64
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x64.Build.0 = Release|x64
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x86.ActiveCfg = Release|x86
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x86.Build.0 = Release|x86
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x64.ActiveCfg = Release|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x64.Build.0 = Release|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x86.ActiveCfg = Release|Any CPU
{89A1D156-DE58-4C80-B8C3-B1B389764D95}.Release|x86.Build.0 = Release|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x64.ActiveCfg = Debug|x64
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x64.Build.0 = Debug|x64
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x86.ActiveCfg = Debug|x86
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x86.Build.0 = Debug|x86
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x64.ActiveCfg = Debug|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x64.Build.0 = Debug|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x86.ActiveCfg = Debug|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Debug|x86.Build.0 = Debug|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|Any CPU.Build.0 = Release|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x64.ActiveCfg = Release|x64
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x64.Build.0 = Release|x64
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x86.ActiveCfg = Release|x86
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x86.Build.0 = Release|x86
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x64.ActiveCfg = Release|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x64.Build.0 = Release|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x86.ActiveCfg = Release|Any CPU
{9D92BAD3-058A-452C-8701-C0E7C3AE268E}.Release|x86.Build.0 = Release|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x64.ActiveCfg = Debug|x64
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x64.Build.0 = Debug|x64
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x86.ActiveCfg = Debug|x86
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x86.Build.0 = Debug|x86
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x64.Build.0 = Debug|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Debug|x86.Build.0 = Debug|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|Any CPU.Build.0 = Release|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x64.ActiveCfg = Release|x64
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x64.Build.0 = Release|x64
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x86.ActiveCfg = Release|x86
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x86.Build.0 = Release|x86
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x64.ActiveCfg = Release|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x64.Build.0 = Release|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x86.ActiveCfg = Release|Any CPU
{2A5BA455-1A0F-4B36-998D-0FBDBCF69137}.Release|x86.Build.0 = Release|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x64.ActiveCfg = Debug|x64
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x64.Build.0 = Debug|x64
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x86.ActiveCfg = Debug|x86
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x86.Build.0 = Debug|x86
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x64.ActiveCfg = Debug|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x64.Build.0 = Debug|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x86.ActiveCfg = Debug|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Debug|x86.Build.0 = Debug|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|Any CPU.Build.0 = Release|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x64.ActiveCfg = Release|x64
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x64.Build.0 = Release|x64
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x86.ActiveCfg = Release|x86
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x86.Build.0 = Release|x86
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x64.ActiveCfg = Release|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x64.Build.0 = Release|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x86.ActiveCfg = Release|Any CPU
{818BF6BF-9F97-47E5-8AFC-77E3EDA2A5C9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion src/WebSocketManager.Client/WebSocketManager.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.WebSockets.Client" Version="4.3.0" />
<PackageReference Include="System.Net.WebSockets.Client" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
48 changes: 39 additions & 9 deletions src/WebSocketManager.Common/Message.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
namespace WebSocketManager.Common
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Text;

namespace WebSocketManager.Common
{
public enum MessageType
public enum MessageType
{
Text,
ClientMethodInvocation,
ConnectionEvent
}

public class Message
{
private static JsonSerializerSettings _jsonSerializerSettings = new JsonSerializerSettings()
{
Text,
ClientMethodInvocation,
ConnectionEvent
}
ContractResolver = new CamelCasePropertyNamesContractResolver()
};

public class Message
public MessageType MessageType { get; set; }
public string Data { get; set; }

private ArraySegment<byte>? serialized = null;

[JsonIgnore]
public ArraySegment<byte> Serialized
{
public MessageType MessageType { get; set; }
public string Data { get; set; }
get
{
lock (this)
{
if (!serialized.HasValue)
{
var serializedMessage = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(this, _jsonSerializerSettings));
serialized = new ArraySegment<byte>(serializedMessage, 0, serializedMessage.Length);
}
}
return serialized.Value;
}
}

}
}
2 changes: 1 addition & 1 deletion src/WebSocketManager.Common/WebSocketManager.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
</ItemGroup>

</Project>
Loading