|
|
@ -164,8 +164,8 @@ public class ClientManagementTCP implements Runnable {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private String[] listDirectory() throws EmptyDirectory, InternalError, UnknownHostException, IOException, TransmissionError, ProtocolError, VersionError, SizeError, InternalRemoteError, ProtocolRemoteError, VersionRemoteError {
|
|
|
|
private String[] listDirectory() throws EmptyDirectory, InternalError, UnknownHostException, IOException, TransmissionError, ProtocolError, VersionError, SizeError, InternalRemoteError, ProtocolRemoteError, VersionRemoteError {
|
|
|
|
ProtocolP2PPacketTCP d = new ProtocolP2PPacketTCP(new Payload(RequestResponseCode.LIST_REQUEST));
|
|
|
|
ProtocolP2PPacketTCP d = new ProtocolP2PPacketTCP(new Payload(RequestResponseCode.LIST_REQUEST));
|
|
|
|
d.sendRequest((Object)hostList.get(0).getTCPSocket());
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
d.sendRequest((Object)hostList.get(0).getTCPSocket());
|
|
|
|
Payload p = d.receiveResponse().getPayload();
|
|
|
|
Payload p = d.receiveResponse().getPayload();
|
|
|
|
assert p instanceof FileList : "This payload must be instance of Filelist";
|
|
|
|
assert p instanceof FileList : "This payload must be instance of Filelist";
|
|
|
|
if (!(p instanceof FileList)) {
|
|
|
|
if (!(p instanceof FileList)) {
|
|
|
|