Slight refactoring

This commit is contained in:
Rick Falkvinge
2017-02-18 01:38:37 +01:00
parent edc98b054f
commit be043c68ed
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -56,7 +56,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MasterServices.cs" />
<Compile Include="FrontendServices.cs" />
<Compile Include="FrontendLoop.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+1 -1
View File
@@ -56,7 +56,7 @@ namespace Swarmops.Frontend.Socket
OutboundComm.CreateNotification(null, NotificationResource.System_Startup_Frontend);
_socketServer = new WebSocketServer (SystemSettings.WebsocketPortFrontend);
_socketServer.AddWebSocketService<MasterServices> ("/Master");
_socketServer.AddWebSocketService<FrontendServices> ("/Front");
// _socketServer.KeepClean = false; // as per the author's recommendation - this may be bad in the long run
_socketServer.Start();
@@ -11,9 +11,9 @@ using WebSocketSharp.Server;
namespace Swarmops.Frontend.Socket
{
internal class MasterServices: WebSocketBehavior
internal class FrontendServices: WebSocketBehavior
{
public MasterServices()
public FrontendServices()
{
base.IgnoreExtensions = true; // Necessary to suppress a Deflate exception that kills server otherwise
}
+2 -2
View File
@@ -47,10 +47,10 @@ function _masterInitializeSocket(authenticationTicket) {
function getMasterSocketAddress() {
if (location.host.indexOf ("localhost") >= 0) { // Assume dev environment, go for sandbox socket
return 'ws://sandbox.swarmops.com/ws/Master';
return 'ws://sandbox.swarmops.com/ws/Front';
} else {
var protocol = ('https:' == document.location.protocol ? 'wss://' : 'ws://');
return protocol + location.host + "/ws/Master";
return protocol + location.host + "/ws/Front";
}
}