The wallet's side of a session: waits for a request frame, hands it to onRequest and sends back the frame that
onRequest resolves with. The first frame that decodes is the request; anything else that arrives is ignored, and so
is everything after the request, because a session carries one request and one answer. A request that onRequest
refuses (it rejects) gets no answer, and the asker's timeout ends the session. Serving a transport twice is PROTOCOL.
The returned function stops serving.
The wallet's side of a session: waits for a request frame, hands it to
onRequestand sends back the frame thatonRequestresolves with. The first frame that decodes is the request; anything else that arrives is ignored, and so is everything after the request, because a session carries one request and one answer. A request thatonRequestrefuses (it rejects) gets no answer, and the asker's timeout ends the session. Serving a transport twice is PROTOCOL. The returned function stops serving.