Esempio n. 1
0
        public string ReadStringLine()
        {
            int index = 0;

            do
            {
                byte c = ReadByte();
                if ((c == 0xff) || (c == 0) || (c == 0x0a))
                {
                    break;
                }
                _stringBuffer[index] = c;
                index++;
            } while (index < 2047);
            string ret = JSConvert.BytesToString(_stringBuffer, 0, index).Trim();

            //Com.dprintln("MSG.ReadStringLine:[" + ret.Replace('\0', '@') + "]");
            return(ret);
        }
Esempio n. 2
0
        public string ReadString()
        {
            int index = 0;

            do
            {
                byte c = ReadByte();
                if ((c == 0xff) || (c == 0))
                {
                    break;
                }
                _stringBuffer[index] = c;
                index++;
            } while (index < 2047);
            string ret = JSConvert.BytesToString(_stringBuffer, 0, index);

            // Com.dprintln("MSG.ReadString:[" + ret + "]");
            return(ret);
        }