public static async Task <HNode> ConnectNewAsync(IPEndPoint endpoint) { HNode remote = null; try { remote = new HNode(); await remote.ConnectAsync(endpoint).ConfigureAwait(false); } catch { remote = null; } finally { if (!remote?.IsConnected ?? false) { remote = null; } } return(remote); }
public bool ReflectFormats(HNode other) { SendFormat = other.ReceiveFormat; ReceiveFormat = other.SendFormat; return(IsWebSocket = other.IsWebSocket); }