public class UtpModule extends Object implements IModule
It's advised to re-use instances of this module as each will create a dedicated thread to receive uTP messages. Using more instances allows for more connections to be used as each instance is limited to 65536 (2^16) connections by protocol design.
| Modifier and Type | Class and Description |
|---|---|
static class |
UtpModule.Builder |
| Modifier and Type | Method and Description |
|---|---|
void |
configureTorrentClient(TorrentClient.Builder builder) |
Supplier<ISocket> |
createSocketFactory() |
List<Class<IModule>> |
getDependsOn() |
int |
getRelatedBep() |
Class<ISocket> |
getUtpSocketClass() |
void |
onBuild(TorrentClient torrentClient) |
void |
onPostHandshake(Peer peer) |
void |
onShutdown() |
public void configureTorrentClient(TorrentClient.Builder builder)
configureTorrentClient in interface IModulepublic int getRelatedBep()
getRelatedBep in interface IModulepublic List<Class<IModule>> getDependsOn()
getDependsOn in interface IModulepublic void onPostHandshake(Peer peer) throws IOException
onPostHandshake in interface IModuleIOExceptionpublic void onBuild(TorrentClient torrentClient) throws ModuleBuildException
onBuild in interface IModuleModuleBuildExceptionpublic void onShutdown()
onShutdown in interface IModulepublic Class<ISocket> getUtpSocketClass()
Copyright © 2017. All rights reserved.