コード例 #1
0
ファイル: NetSession.cs プロジェクト: geger009/Raiderz_Public
        private void PostDisconnected()
        {
            NetCommand command = new NetCommand(0, LocalCMD.DISCONNECTED);

            command.WriteUInt64(m_nSessionID);
            command.MakingComplete();
            m_refCommandQueue.PushCommand(command);
        }
コード例 #2
0
ファイル: NetSession.cs プロジェクト: geger009/Raiderz_Public
        private void PostConnected(bool bIsSuccess)
        {
            NetCommand command = new NetCommand(0, LocalCMD.CONNECTED);

            command.WriteUInt64(m_nSessionID);
            command.WriteBoolean(bIsSuccess);
            command.MakingComplete();
            m_refCommandQueue.PushCommand(command);
        }
コード例 #3
0
        private void ProcAccept()
        {
            bool bRun = true;

            while (bRun)
            {
                try
                {
                    Socket socketClient = m_tcpListener.AcceptSocket();
                    if (socketClient.Connected == false)
                    {
                        continue;
                    }

                    UInt64 nSessionID = m_dlgtCreateSession(socketClient);

                    NetCommand command = new NetCommand(0, LocalCMD.ACCEPTED);
                    command.WriteUInt64(nSessionID);
                    command.MakingComplete();
                    m_refCmdQueue.PushCommand(command);
                }
                catch { bRun = false; }
            }
        }