Exemple #1
0
 public void Connect(IntPtr address, Action <UvArgs> callback = null)
 {
     try
     {
         _address = address;
         CheckError(Uvi.uv_tcp_connect(this.Connection, this.Handle, _address, _connectDelegate));
         this.Status      = HandleStatus.Opening;
         _connectCallback = new UvCallback(this, callback);
     }
     catch (Exception)
     {
         _address         = this.Loop.Allocs.Free(_address);
         _connectCallback = null;
         throw;
     }
 }