Add request-response protocol
Protocol
Generic request-response protocol, to be used as base for user define protocols with custom id, request and response types serialized with protobuf
Details
-
Type: app layer protocol
-
Spec: user:
- implements custom handling logic that receives REQUEST type and returns object of RESPONSE type;
- defines protocol id,
- registers protocol
listener:
- accepts a connection,
- receives data,
- de-serializes it into REQUEST type,
- allows handling logic to process the request,
- sends serialized response to dialer and
- closes the connection
dialer:
- allows to send custom request and receive response using particular
DialAsyncmethod override
TODO
- [ ] Implement generic protocol, that implements
ISessionProtocol<TRequest, TResponse>protocol; - [ ] Add a generic extension method that receives logic handling method, protocol id; and registers protocol as
AddAppLayerProtocoldoes - [ ] Add docs
- [ ] Add tests
Could you please assign this to me? I'd like to take a look
Hi, is this issue in active developement?
@lucafabbri hello, nop, feel free to pick it
@flcl42 please, assign to me and I'll start working on it if nobody's against
@flcl42 : Hi Aleksey. As discussed @namay26 will be working on interop engineering between dotnet-libp2p and py-libp2p. He has made key contributions to py-libp2p in the past.
As a starting project assignment in dotnet-libp2p, I am asking him to contribute to it while working with us.
@namay26 : Please reach out to us on dotnet-libp2p discord if you encounter any issues.
Sure, thank you for assigning the issue, will soon share the progress.