private MessageHost AcceptClient(TcpClient client) { var host = new MessageHost(client, messageRegistry); host.ThreadException += Host_OnThreadException; host.Stopped += Host_Stopped; hostList.Add(host); return(host); }
protected virtual void BeginOnConnectionReceived(MessageHost host) { if (ConnectionReceived == null) { return; } var args = new TcpConnectionReceivedEventArgs(host); ConnectionReceived?.BeginInvoke(this, args, EndOnConnectionReceived, args); }
public TcpConnectionReceivedEventArgs(MessageHost host) { this.Host = host; Accept = true; }