Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 californium 库在我的 Eclipse 项目中使用 Coap 协议。我已经向服务器 Coap 发送了一个请求。现在我在这台服务器上设置了一个不同的端点来给出响应。我如何实现一个监听并等待接收此响应的观察者?
我很不确定,如果我理解你的问题。
我怎样才能实现一个监听器来响应?
在服务器端?准备回应?
然后意图是覆盖 CoapResource.handleGET。
对观察请求的响应必须始终来自请求发送到的同一端点。来自该服务器上不同端点的消息(即来自不同 IP 地址或来自不同端口)的消息将不会被客户端识别。