Pārlūkot izejas kodu

Removed reference to websocket-sharp and added Host property to SocketTransport for displaying the connected URL

Kenric Nugteren 1 gadu atpakaļ
vecāks
revīzija
596bdbce22

+ 0 - 1
InABox.Client.RPC/InABox.Client.RPC.csproj

@@ -8,7 +8,6 @@
     </PropertyGroup>
 
     <ItemGroup>
-      <ProjectReference Include="..\..\3rdpartylibs\websocket-sharp-master\websocket-sharp-standard\websocket-sharp-standard.csproj" />
       <ProjectReference Include="..\InABox.RPC.Shared\InABox.RPC.Shared.csproj" />
     </ItemGroup>
 

+ 1 - 1
InABox.Client.RPC/Transports/IRPCClientTransport.cs

@@ -9,7 +9,7 @@ namespace InABox.Rpc
     {
 
         bool Ping();
-        DatabaseInfo Info();
+        DatabaseInfo? Info();
         
         /// <summary>
         /// Connect to remote server.

+ 2 - 3
InABox.Client.RPC/Transports/RPCClientTransport.cs

@@ -6,7 +6,6 @@ using System.Threading;
 using System.Threading.Tasks;
 using InABox.Clients;
 using InABox.Core;
-using WebSocketSharp;
 using Logger = InABox.Core.Logger;
 
 namespace InABox.Rpc
@@ -158,7 +157,7 @@ namespace InABox.Rpc
                 result = transport.IsConnected();
                 transport.Disconnect();
             }
-            catch (Exception e)
+            catch
             {
             }
             return result;
@@ -175,7 +174,7 @@ namespace InABox.Rpc
 
                 return result;
             }
-            catch (Exception e)
+            catch
             {
                 return null;
             }

+ 2 - 0
InABox.Client.RPC/Transports/Socket/RPCClientSocketTransport.cs

@@ -21,6 +21,8 @@ namespace InABox.Rpc
         
         private string[] _urls;
 
+        public string? Host => _host;
+
         public RpcClientSocketTransport(string[] urls)
         {
             _urls = urls;