Пример #1
0
 /// <summary>
 /// 每当客户端连接时
 /// </summary>
 /// <param name="listener"></param>
 /// <param name="connected"></param>
 /// <returns></returns>
 public static Task <TcpListener> WheneverTcpClientConnected(this TcpListener listener, Action <TcpClient> connected)
 {
     return(listener.WheneverTcpClientConnected(connected, CancellationToken.None));
 }