예제 #1
0
        //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;
        }
예제 #2
0
        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);
        }
예제 #3
0
 internal AppSession(AppSocket appSocket)
 {
     AppSocket = appSocket;
 }
예제 #4
0
	    internal AppSession(AppSocket appSocket)
        {
            AppSocket = appSocket;
        }