quemen redes

This commit is contained in:
binlaab
2026-04-20 22:38:38 +02:00
parent aa8b7b30fb
commit 25bf19ee9c
15 changed files with 414 additions and 42 deletions

View File

@@ -12,7 +12,9 @@ public class PeerMessageOps {
* los diferentes tipos de mensajes del protocolo de comunicación con un par
* servidor de ficheros (valores posibles del campo "operation").
*/
public static final byte OPCODE_REQUEST_PEER_FILES = 1;
public static final byte OPCODE_PEER_FILE = 2;
public static final byte OPCODE_PEER_FILES_ERROR = 3;
@@ -22,14 +24,14 @@ public class PeerMessageOps {
* su representación textual a "valid_operations_str" EN EL MISMO ORDEN.
*/
private static final Byte[] _valid_opcodes = { OPCODE_INVALID_CODE,
OPCODE_REQUEST_PEER_FILES,
OPCODE_PEER_FILE,
OPCODE_PEER_FILES_ERROR
};
private static final String[] _valid_operations_str = { "INVALID_OPCODE",
"REQUEST_PEER_FILES",
"PEER_FILE",
"PEER_FILES_ERROR"
};
private static Map<String, Byte> _operation_to_opcode;