Package | Description |
---|---|
clientP2P | |
protocolP2P |
Modifier and Type | Method and Description |
---|---|
void |
ClientManagement.download(java.lang.String filename)
Try to download a file
|
java.lang.String[] |
ClientManagement.listDirectory()
list server’s directory content
|
Modifier and Type | Method and Description |
---|---|
private void |
ProtocolP2PPacketUDP.checkCheckSum(byte[] packet)
Used to check if the checksum is correct
|
private void |
ProtocolP2PPacketUDP.constructPacket(byte[] packet)
Private constructor helper with packet as byte[] parameter (typically used when receiving Packet response/request).
|
private void |
ProtocolP2PPacketTCP.constructPacket(byte[] packet)
Private constructor helper with packet as byte[] parameter (typically used when receiving Packet response/request).
|
private void |
ProtocolP2PPacketUDP.constructPacket(byte[] packet,
java.net.DatagramSocket responseSocket)
Private constructor helper with packet as byte[] parameter and (typically used when receiving Packet request).
|
private void |
ProtocolP2PPacketTCP.constructPacket(byte[] packet,
java.net.Socket responseSocket)
Private constructor helper with packet as byte[] parameter and (typically used when receiving Packet request).
|
ProtocolP2PPacket<?> |
ProtocolP2PPacketUDP.receiveResponse()
Receive response (typically used by client).
|
ProtocolP2PPacket<?> |
ProtocolP2PPacketTCP.receiveResponse()
Receive response (typically used by client).
|
abstract ProtocolP2PPacket<?> |
ProtocolP2PPacket.receiveResponse()
Receive a response
|
Constructor and Description |
---|
Denied(byte[] packet)
Constructor (typically used by client) with Packet received as parameter.
|
DiscoverRequest(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
DiscoverResponse(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
FileList(byte[] packet)
Constructor (typically used by client) with a byte[] parameter containing the Packet received.
|
FilePart(byte[] packet)
Constructor (typically used by client) with Packet received as parameter.
|
HashRequest(byte[] packet)
Constructor (typically used by client) with a byte[] parameter containing the Packet received.
|
HashResponse(byte[] packet)
Constructor (typically used by client) with a byte[] parameter containing the Packet received.
|
LoadRequest(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
Payload(byte[] packet)
Constructor used to create a Payload (when no more specific subclasses exists) using packet as parameter.
|
ProtocolP2PPacket(byte[] packet)
Construct a packet from byte[], subclasses must overwrite this constructor.
|
ProtocolP2PPacket(java.lang.Object socket)
Receive a request, subclasses must overwrite this constructor.
|
ProtocolP2PPacketTCP(byte[] packet)
Private constructor with packet as byte[] parameter (typically used when receiving Packet response).
|
ProtocolP2PPacketTCP(java.lang.Object socket)
Receive Request (typically used from server).
|
ProtocolP2PPacketUDP(byte[] packet)
Private constructor with packet as byte[] parameter (typically used when receiving Packet response).
|
ProtocolP2PPacketUDP(java.lang.Object socket)
Receive Request (typically used from server).
|
RatioRequest(byte[] packet)
Constructor (typically used by tracker) with a byte[] parameter containing the Packet received.
|
RatioResponse(byte[] packet)
Constructor (typically used by client/server) with a byte[] parameter containing the Packet received.
|
Register(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
SizeRequest(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
SizeResponse(byte[] packet)
Constructor (typically used by client) with Packet received as parameter.
|
Unregister(byte[] packet)
Constructor (typically used by server) with a byte[] parameter containing the Packet received.
|
UpdateRatio(byte[] packet)
Constructor (typically used by tracker) with a byte[] parameter containing the Packet received.
|