protected override void ServeRequest(Stream ssl) { string token = ""; char[] chars = new char[20]; StreamReader sr = new StreamReader(ssl, Encoding.Default); sr.Read(chars, 0, 20); foreach (char c in chars) { token += c; } if (token != this.token) { if (this.errorEvent != null) { this.errorEvent(this.token); } return; } UsefullMethods.CopyStream(this.fileStream, ssl); ssl.Close(); fileStream.Close(); }