mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
feat: working websocket debug server
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.0.0-local</Version>
|
<Version>2.0.0-local</Version>
|
||||||
|
<InformationalVersion>$(Version)</InformationalVersion>
|
||||||
<Authors>PepperDash Technologies</Authors>
|
<Authors>PepperDash Technologies</Authors>
|
||||||
<Company>PepperDash Technologies</Company>
|
<Company>PepperDash Technologies</Company>
|
||||||
<Product>PepperDash Essentials</Product>
|
<Product>PepperDash Essentials</Product>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
||||||
<Aliases>Full</Aliases>
|
<Aliases>Full</Aliases>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-351" />
|
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-366" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Crestron\CrestronGenericBaseDevice.cs.orig" />
|
<None Include="Crestron\CrestronGenericBaseDevice.cs.orig" />
|
||||||
|
|||||||
@@ -42,12 +42,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
|
|
||||||
var port = 0;
|
var port = 0;
|
||||||
|
|
||||||
if(Debug.WebsocketSink == null)
|
if (!Debug.WebsocketSink.IsRunning)
|
||||||
{
|
|
||||||
Debug.Console(0, "WebsocketSink is null");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Debug.WebsocketSink.IsListening)
|
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Starting WS Server");
|
Debug.Console(0, "Starting WS Server");
|
||||||
// Generate a random port within a specified range
|
// Generate a random port within a specified range
|
||||||
@@ -56,11 +51,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
Debug.WebsocketSink.StartServerAndSetPort(port);
|
Debug.WebsocketSink.StartServerAndSetPort(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var url = Debug.WebsocketSink.Url;
|
||||||
|
|
||||||
object data = new
|
object data = new
|
||||||
{
|
{
|
||||||
url = string.Format(@"wss://{0}:{1}", ip, Debug.WebsocketSink.Port)
|
url = Debug.WebsocketSink.Url
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Debug.Console(0, "Debug Session URL: {0}", url);
|
||||||
|
|
||||||
// Return the port number with the full url of the WS Server
|
// Return the port number with the full url of the WS Server
|
||||||
var res = JsonConvert.SerializeObject(data);
|
var res = JsonConvert.SerializeObject(data);
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,6 @@
|
|||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
||||||
<Aliases>Full</Aliases>
|
<Aliases>Full</Aliases>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-351" />
|
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-366" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
||||||
<Aliases>Full</Aliases>
|
<Aliases>Full</Aliases>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-351" />
|
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-366" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
|
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
|
||||||
|
|||||||
Reference in New Issue
Block a user