SuperSocket从服务器端主动发起连接

你可以从服务器端主动连接客户端, 连接建立之后的网络通信处理将和客户端主动建立连接的处理方式一样。
var activeConnector = appServer as IActiveConnector;
var task = activeConnector.ActiveConnect(remoteEndPoint);
task.ContinueWith(
          t => Logger.InfoFormat("Client connected, SessionID: {0}", t.Result.Session.SessionID),
          TaskContinuationOptions.OnlyOnRanToCompletion);
原文地址:https://www.cnblogs.com/fanweisheng/p/11127625.html