ResponseComplete Event

Fires when a response has been sent to a client.

Syntax

public event OnResponseCompleteHandler OnResponseComplete;

public delegate void OnResponseCompleteHandler(object sender, CoapResponseCompleteEventArgs e);

public class CoapResponseCompleteEventArgs : EventArgs {
  public string RequestId { get; }
  public int ErrorCode { get; }
  public string ErrorDescription { get; }
}
Public Event OnResponseComplete As OnResponseCompleteHandler

Public Delegate Sub OnResponseCompleteHandler(sender As Object, e As CoapResponseCompleteEventArgs)

Public Class CoapResponseCompleteEventArgs Inherits EventArgs
  Public ReadOnly Property RequestId As String
  Public ReadOnly Property ErrorCode As Integer
  Public ReadOnly Property ErrorDescription As String
End Class

Remarks

This event fires anytime a response has been sent to a client. If the UseConfirmableMessages property is enabled, then the response is considered complete once the client has confirmed that it received the response (or once the retransmission period elapses). If the UseConfirmableMessages property is disabled, the response is considered complete immediately (since there is no way to know if the client received it).

The RequestId parameter reflects the component-generated Id of the request for which the response was sent.

The ErrorCode parameter indicates whether the response encountered an error (e.g., transmission timed out). If no error was encountered, it will be 0.

The ErrorDescription parameter provides a description of the error that occurred. It will be empty if no error was encountered.

Note: This event is only used when the component is operating in server mode (i.e., when the Listening property is enabled).

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 .NET Edition - Version 20.0 [Build 8265]