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 |
---|---|
protected void |
ProtocolP2PPacket.checkProtocolVersion()
Used to check protocol version when a Packet is constructed from bytes[].
|
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 |
---|
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).
|