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); }
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); }