Custom Transport Protocols
A transport protocol provides the network-level communication mechanism for sending bytes of data between peers.
TorrentCore includes built-in support for communicating with peers over TCP. You
can add support for any custom communication protocol that is able to expose
connections to peers as a System.IO.Stream
. (Of course, protocols other than
TCP and uTP are incompatible with other BitTorrent clients.)
Usage
Create a TorrentClient
with a custom transport protocol:
ITransportProtocol customTransportProtocol = ...;
ITrackerClientFactory customTrackerClientFactory = ...;
var client = new TorrentClient(
PeerId.CreateNew(),
customTransportProtocol,
customTrackerClientFactory);