How set a Coap Observer that listen for response

581 views Asked by At

I'm working with californium library to use Coap protocol in my eclipse project. I have sent a request to a server Coap. Now i have set on this server a different end point to give response. How can i implement an observer that listen and wait to receive this response ?

2

There are 2 answers

2
chrysn On

The response to an observe request must always come from the same endpoint as the request was sent to. A message from a different endpoint on that server (that is, from a different IP address or from a different port) would not be recognized by the client.

0
Achim Kraus On

I'm pretty unsure, If I understand your question.

how can i implement a listener for response ?

On the server side? To prepare the response?

Then the intention is to override CoapResource.handleGET.