public static HubNetworkClient CreateClient(EndPoint ep, string name, ClientSocketOptions opts = null) { return(new HubNetworkClient(name, ep as IPEndPoint, opts ?? new ClientSocketOptions { AutoReconnect = false, Heartbeat = false, HeartbeatInterval = TimeSpan.MaxValue })); }
public InternalHubNetworkClient(string name, string network, TcpClient client, ClientSocketOptions opts, Logger logger) { Name = name; _network = network; _endpoint = client.RemoteEndPoint; _client = client; _opts = opts; _logger = logger ?? LogManager.GetLogger("HubNetwork.Client"); }
public InternalHubNetworkClient(string name, string network, IPEndPoint ep, ClientSocketOptions opts, Logger logger) { Name = name; _network = network; _endpoint = ep; _client = new TcpClient(new System.Net.Sockets.TcpClient()); _opts = opts; _logger = logger ?? LogManager.GetLogger("HubNetwork.Client"); }