Exemple #1
0
 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;
             }
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// Sends a &quot;hello&quot; 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);
                }
            }
        }