protected void WaitForInstructions() { while (this.Connection != null) { foreach (var record in UnknownRecord.FromStream(this.Stream, this.Crypter)) { if (record is ClientHelloRecord) { var helloFromClient = record as ClientHelloRecord; } } } }
/// <summary> /// Sends a "hello" to the server. /// </summary> public void SayHello() { lock (this._SYNC) { try { var helloServer = new ClientHelloRecord(this.Crypter); helloServer.SendTo(this.Connection); foreach (var record in UnknownRecord.FromStream(this.Stream, this.Crypter)) { if (record != null) { } } } catch (Exception ex) { this.RaiseError(ex, true); } } }