You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contrary to #829 and #828, this one is more difficult as we have to answer requests by sending a response in the same substream as the request.
There are two possibilities:
When the ProtocolsHandler receives a request, it sends through an event an object containing the subtream to the NetworkBehaviour. The NetworkBehaviour then runs the future that sends back the answer.
When the ProtocolsHandler receives a request, it sends through an event some sort of identifier to the NetworkBehaviour, which must then be sent back to the ProtocolsHandler through another event.
The current approach is the second one, and I would be more in favour of this second approach, as it removes the possibility of having to wait for a Mutex when writing on a substream, and avoids waking up the "main task" when we are ready to send data to a specific node.
No description provided.
The text was updated successfully, but these errors were encountered: