I have a large file. I want to transfer this file block by block. #4213
-
I have a large file. I want to transfer this file block by block (1 MB per transfer) from one device to another. how can I do that using the ibp2p package? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can certainly do that. You can:
For the most part, If you want to implement your own protocol, I would suggest to first define on paper, what your messages look like. Once that is laid out, we can help you in mapping such a protocol to our abstractions. |
Beta Was this translation helpful? Give feedback.
You can certainly do that. You can:
libp2p-request-response
if you want to follow a request-response modelNetworkBehaviour
andConnectionHandler
if you e.g. want to use more of a streaming approachFor the most part,
rust-libp2p
deals with the abstractions around managing connections for you and running protocols over them concurrently. A very simple example of a file-sharing protocol is in https://github.com/libp2p/rust-libp2p/tree/master/examples/file-sharing but that one is not using blocks.If you want to implement your own protocol, …