コード例 #1
0
ファイル: AppClient.cs プロジェクト: ibeae/ThinkAway.net
        //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
ファイル: AppSession.cs プロジェクト: ibeae/ThinkAway.net
 internal AppSession(AppSocket appSocket)
 {
     AppSocket = appSocket;
 }
コード例 #4
0
	    internal AppSession(AppSocket appSocket)
        {
            AppSocket = appSocket;
        }