implementado quit, hay que cerrar los sockets TCP cuando terminen las cosas

This commit is contained in:
binlaab
2026-04-27 23:58:44 +02:00
parent 4e60e66926
commit c480c4a831
8 changed files with 50 additions and 16 deletions

View File

@@ -75,6 +75,11 @@ public class DirMessage {
}
public DirMessage(String op, String nick) {
this(op);
this.nick = nick;
}
public DirMessage(String op, FileInfo[] filelist) {
this(op);
this.fileList = filelist;
@@ -275,6 +280,7 @@ public class DirMessage {
break;
case DirMessageOps.OPERATION_SERVE:
case DirMessageOps.OPERATION_STOP_SERVE:
sb.append(FIELDNAME_NICK + DELIMITER + this.nick + END_LINE);
sb.append(FIELDNAME_IP + DELIMITER + this.ip + END_LINE);
sb.append(FIELDNAME_PORT + DELIMITER + this.port + END_LINE);

View File

@@ -22,6 +22,10 @@ public class DirMessageOps {
public static final String OPERATION_REQUEST_SERVER_PEERS = "peers";
public static final String OPERATION_SERVER_PEERS = "serverPeers";
public static final String OPERATION_STOP_SERVE = "stopServe";
public static final String OPERATION_STOP_SERVE_OK = "stopServeOk";
public static final String OPERATION_STOP_SERVE_ERROR = "stopServeError";
// TODO: definir las operaciones del protocolo de directorio