protected string m_userName; //用户用户名 #endregion Fields #region Constructors public BaseSocketProtocol(AsyncSocketServer asyncSocketServer, AsyncSocketUserToken asyncSocketUserToken) : base(asyncSocketServer, asyncSocketUserToken) { m_userName = ""; m_logined = false; m_socketFlag = ""; }
public LogOutputSocketProtocol(AsyncSocketServer asyncSocketServer, AsyncSocketUserToken asyncSocketUserToken) : base(asyncSocketServer, asyncSocketUserToken) { m_socketFlag = "LogOutput"; m_logFixedBuffer = new LogFixedBuffer(); lock (Program.AsyncSocketSvr.LogOutputSocketProtocolMgr) { Program.AsyncSocketSvr.LogOutputSocketProtocolMgr.Add(this); } SendResponse(); }
/// <summary> /// 开启 监听 /// </summary> public void StartServer() { writeLog = new WriteLog("Log"); Debug.WriteLog = writeLog; Console.WriteLine("...开始TCP监听"); IPAddress address = IPAddress.Any; int port = 8800; int parallelNum = 1000; int socketTimeOutMS = 1000; AsyncSocketSvr = new AsyncSocketServer.AsyncSocketServer(parallelNum); AsyncSocketSvr.ServerLogic = this; AsyncSocketSvr.SocketTimeOutMS = socketTimeOutMS; AsyncSocketSvr.Init(); IPEndPoint listenPoint = new IPEndPoint(IPAddress.Any, port); AsyncSocketSvr.Start(listenPoint); }
public DaemonThread(AsyncSocketServer asyncSocketServer) { m_asyncSocketServer = asyncSocketServer; m_thread = new Thread(DaemonThreadStart); m_thread.Start(); }
public ControlSocketProtocol(AsyncSocketServer asyncSocketServer, AsyncSocketUserToken asyncSocketUserToken) : base(asyncSocketServer, asyncSocketUserToken) { m_socketFlag = "Control"; }
public ThroughputSocketProtocol(AsyncSocketServer asyncSocketServer, AsyncSocketUserToken asyncSocketUserToken) : base(asyncSocketServer, asyncSocketUserToken) { m_socketFlag = "Throughput"; }
public HeatLiChuangProtocol(AsyncSocketServer asyncSocketServer, AsyncSocketUserToken asyncSocketUserToken) : base(asyncSocketServer, asyncSocketUserToken) { m_socketFlag = "Control"; }
public RemoteStreamSocketProtocol(AsyncSocketServer asyncSocketServer, AsyncSocketUserToken asyncSocketUserToken) : base(asyncSocketServer, asyncSocketUserToken) { m_socketFlag = "RemoteStream"; m_fileStream = null; }