Class PTPModule
java.lang.Object
io.github.michael_bailey.client.managers.NetworkModules.PTPModule
public class PTPModule
extends java.lang.Object
- 
Constructor SummaryConstructors Constructor Description PTPModule(NetworkManager manager, int port)
- 
Method SummaryModifier and Type Method Description voidptpThreadWorkerFn(java.net.Socket socket)ptpThreadWorkerFn this is called when a io.github.michael_bailey.client connects to this process for peer to peer communication it first asks for a request (simalar to a server).booleanstart()ptpStart this will create a new server socket and ptp thread it the cretes a new thread pool for incoming connection's then proceds to start the ptp thread.voidstop()
- 
Constructor Details
- 
Method Details- 
ptpThreadWorkerFnpublic void ptpThreadWorkerFn(java.net.Socket socket)ptpThreadWorkerFn this is called when a io.github.michael_bailey.client connects to this process for peer to peer communication it first asks for a request (simalar to a server). after wich the io.github.michael_bailey.client should send the data over. to which it will respond with success for fail.- Parameters:
- socket- the new connection
 
- 
startpublic boolean start()ptpStart this will create a new server socket and ptp thread it the cretes a new thread pool for incoming connection's then proceds to start the ptp thread.- Returns:
- a boolean is returned if the ptp module started correctly
 
- 
stoppublic void stop()
 
-