Exemple #1
0
        public Client2(DgClntBufHndl hndl, DgClntBufPrep prep, bool allMsg)
        {
            string filePath = "ServerAddr.txt";

            if (System.IO.File.Exists(filePath))
            {
                mSrvrAddr = System.IO.File.ReadAllText(filePath);
            }
            else
            {
                mSrvrAddr = "127.0.0.1";
            }
            filePath = "ServerPort.txt";
            if (System.IO.File.Exists(filePath))
            {
                mSrvrPort = Convert.ToInt32(System.IO.File.ReadAllText(filePath));
            }
            else
            {
                mSrvrPort = 33333;
            }
            dgBufHndl = hndl;
            dgBufPrep = prep;
            bRW       = false;
            bCbMsg    = allMsg;
        }
Exemple #2
0
        public Client2(string addr, DgClntBufHndl hndl, DgClntBufPrep prep, bool allMsg)
        {
            mSrvrAddr = addr;
            string filePath = "ClientPort.txt";

            if (System.IO.File.Exists(filePath))
            {
                mSrvrPort = Convert.ToInt32(System.IO.File.ReadAllText(filePath));
            }
            else
            {
                mSrvrPort = 33334;
            }
            dgBufHndl = hndl;
            dgBufPrep = prep;
            bRW       = false;
            bCbMsg    = allMsg;
        }