Changeset 174 for binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs
- Timestamp:
- Sep 7, 2014, 8:16:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs
r142 r174 41 41 if (!IsClosed () && stream.CanWrite) { 42 42 byte[] utfData = Encoding.UTF8.GetBytes (s); 43 stream.Write (utfData, 0, utfData.Length);43 stream.Write (utfData, 0, utfData.Length); 44 44 WriteByte (13); 45 45 WriteByte (10); … … 80 80 int b = stream.ReadByte (); 81 81 if (b == '\r' || b == '\n') { 82 if (lineBufferLength > 0) 82 if (lineBufferLength > 0) { 83 83 return true; 84 } 84 85 } else if (b >= 0) { 85 lineBuffer [lineBufferLength] = (byte)b;86 lineBuffer [lineBufferLength] = (byte)b; 86 87 lineBufferLength++; 87 88 } … … 92 93 public string GetLine () 93 94 { 94 string res = Encoding.UTF8.GetString (lineBuffer, 0, lineBufferLength);;95 string res = Encoding.UTF8.GetString (lineBuffer, 0, lineBufferLength); 95 96 lineBufferLength = 0; 96 97 return res;
Note:
See TracChangeset
for help on using the changeset viewer.