internal ObservationRegistration RegisterSubscription(ClientBase Client, CoapEndpoint Endpoint, CoapMessage Message) { ObservationRegistration Result; string Key = Message.From.ToString() + " " + Message.Token.ToString(); Result = new ObservationRegistration(Client, Endpoint, Message); lock (this.registrations) { this.registrations[Key] = Result; this.registeredMessages = null; } return(Result); }
/// <summary> /// Event arguments for CoAP response callbacks. /// </summary> /// <param name="Client">UDP Client.</param> /// <param name="Endpoint">CoAP Endpoint.</param> /// <param name="Ok">If the request was successful or not.</param> /// <param name="State">State object passed to the original request.</param> /// <param name="Message">Response message.</param> /// <param name="Resource">Resource</param> internal CoapResponseEventArgs(ClientBase Client, CoapEndpoint Endpoint, bool Ok, object State, CoapMessage Message, CoapResource Resource) : base(Client, Endpoint, Message, Resource) { this.ok = Ok; this.state = State; }