Example #1
0
 /// <summary>
 /// Cancel this observe relation.
 /// </summary>
 public void Cancel()
 {
     if (log.IsDebugEnabled)
     {
         log.Debug("Cancel observe relation from " + _key + " with " + _resource.Path);
     }
     // stop ongoing retransmissions
     if (_exchange.Response != null)
     {
         _exchange.Response.Cancel();
     }
     _established = false;
     _resource.RemoveObserveRelation(this);
     _endpoint.RemoveObserveRelation(this);
     _exchange.Complete = true;
 }