fix: correct negotiate endpoint name
Was previously "negotiation/", but the API document described it as "negotiate/". It is now "negotiate/" in the implementation as well. ref: N25B-168
This commit is contained in:
@@ -27,7 +27,7 @@ class MainReceiver(ReceiverBase):
|
|||||||
def _handle_port_negotiation(message):
|
def _handle_port_negotiation(message):
|
||||||
endpoints = [socket.endpoint_description() for socket in state.sockets]
|
endpoints = [socket.endpoint_description() for socket in state.sockets]
|
||||||
|
|
||||||
return {"endpoint": "negotiation/ports", "data": endpoints}
|
return {"endpoint": "negotiate/ports", "data": endpoints}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _handle_negotiation(message):
|
def _handle_negotiation(message):
|
||||||
@@ -42,10 +42,10 @@ class MainReceiver(ReceiverBase):
|
|||||||
"""
|
"""
|
||||||
# In the future, the sender could send information like the robot's IP address, etc.
|
# In the future, the sender could send information like the robot's IP address, etc.
|
||||||
|
|
||||||
if message["endpoint"] == "negotiation/ports":
|
if message["endpoint"] == "negotiate/ports":
|
||||||
return MainReceiver._handle_port_negotiation(message)
|
return MainReceiver._handle_port_negotiation(message)
|
||||||
|
|
||||||
return {"endpoint": "negotiation/error", "data": "The requested endpoint is not implemented."}
|
return {"endpoint": "negotiate/error", "data": "The requested endpoint is not implemented."}
|
||||||
|
|
||||||
def handle_message(self, message):
|
def handle_message(self, message):
|
||||||
if "endpoint" not in message:
|
if "endpoint" not in message:
|
||||||
|
|||||||
Reference in New Issue
Block a user