mirror of
https://github.com/AlexMacocian/MTSC.git
synced 2026-07-24 03:56:32 +00:00
Implement pong response to ping in websocketroutinghandler.
This commit is contained in:
+3
-3
@@ -5,13 +5,13 @@
|
||||
<TargetFrameworks>netcoreapp2.1;net48;netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
<Version>3.2</Version>
|
||||
<Version>3.2.1</Version>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Authors>Alexandru-Victor Macocian</Authors>
|
||||
<Product>MTSC</Product>
|
||||
<Description>Modular TCP Server and Client</Description>
|
||||
<AssemblyVersion>0.3.2</AssemblyVersion>
|
||||
<FileVersion>0.3.2</FileVersion>
|
||||
<AssemblyVersion>0.3.2.1</AssemblyVersion>
|
||||
<FileVersion>0.3.2.1</FileVersion>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<PackageProjectUrl>https://github.com/AlexMacocian/MTSC</PackageProjectUrl>
|
||||
|
||||
@@ -204,11 +204,12 @@ namespace MTSC.ServerSide.Handlers
|
||||
if (receivedMessage.Opcode == WebsocketMessage.Opcodes.Close)
|
||||
{
|
||||
client.ToBeRemoved = true;
|
||||
WebsocketMessage closeFrame = new WebsocketMessage
|
||||
{
|
||||
Opcode = WebsocketMessage.Opcodes.Close
|
||||
};
|
||||
this.QueueMessage(client, closeFrame);
|
||||
this.QueueMessage(client, new byte[0], WebsocketMessage.Opcodes.Close);
|
||||
return true;
|
||||
}
|
||||
else if (receivedMessage.Opcode == WebsocketMessage.Opcodes.Ping)
|
||||
{
|
||||
this.QueueMessage(client, new byte[0] ,WebsocketMessage.Opcodes.Pong);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user