IPWorks IoT 2020 Kotlin Edition

Questions / Feedback?

ResponseComplete Event

Fires when a response has been sent to a client.

Syntax

public open class DefaultCoapEventListener : CoapEventListener {
  ...
  public override fun responseComplete(e: CoapResponseCompleteEvent) {}
  ...
}

public class CoapResponseCompleteEvent {
  val requestId: String?
  val errorCode: Int
  val errorDescription: String?
}

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) 2021 /n software inc. - All rights reserved.
IPWorks IoT 2020 Kotlin Edition - Version 20.0 [Build 7941]