AddWsHostWrapper() private method

private AddWsHostWrapper ( HostTopologyInternal topologyInt, string ip, int port ) : int
topologyInt HostTopologyInternal
ip string
port int
return int
        public static int AddWebsocketHost(HostTopology topology, int port, [DefaultValue("null")] string ip)
        {
            if (port != 0)
            {
                if (NetworkTransport.IsPortOpen(ip, port))
                {
                    throw new InvalidOperationException("Cannot open web socket on port " + port + " It has been already occupied.");
                }
            }
            if (topology == null)
            {
                throw new NullReferenceException("topology is not defined");
            }
            NetworkTransport.CheckTopology(topology);
            int result;

            if (ip == null)
            {
                result = NetworkTransport.AddWsHostWrapperWithoutIp(new HostTopologyInternal(topology), port);
            }
            else
            {
                result = NetworkTransport.AddWsHostWrapper(new HostTopologyInternal(topology), ip, port);
            }
            return(result);
        }
 public static int AddWebsocketHost(HostTopology topology, int port, [DefaultValue("null")] string ip)
 {
     if (topology == null)
     {
         throw new NullReferenceException("topology is not defined");
     }
     if (ip == null)
     {
         return(NetworkTransport.AddWsHostWrapperWithoutIp(new HostTopologyInternal(topology), port));
     }
     return(NetworkTransport.AddWsHostWrapper(new HostTopologyInternal(topology), ip, port));
 }