//private readonly ManualResetEvent _manualResetEvent; public AppClient() { _protocol = new TProtocol(); //_manualResetEvent = new ManualResetEvent(false); Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); _appSocket = new AppSocket(ref socket); _appSocket.Received += appSocket_Received; _appSocket.Disconnected += appSocket_Disconnected; }
internal void Add(AppSocket appSocket) { TAppSession appSession = new TAppSession(); appSession.AppSocket = appSocket; appSession.StartSession(); _dictionary.Add(appSession.SessionKey, appSession); // SessionEventArgs sessionEventArgs = new SessionEventArgs(); sessionEventArgs.SessionKey = appSession.SessionKey; OnSessionStarted(sessionEventArgs); }
internal AppSession(AppSocket appSocket) { AppSocket = appSocket; }