tcp multiple #32

Merged
louis_royer merged 11 commits from tcp into servs-multiples 2020-03-18 16:26:21 +01:00
Showing only changes of commit 1550c5bbbe - Show all commits

View File

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