mirror of
https://github.com/binlaab/nanofiles.git
synced 2026-07-01 12:17:21 +02:00
uwu
This commit is contained in:
@@ -289,7 +289,15 @@ public class DirectoryConnector {
|
||||
* de la operación
|
||||
*/
|
||||
|
||||
DirMessage serve = new DirMessage(DirMessageOps.OPERATION_SERVE, NanoFiles.peerNickname, this.directoryHostname, serverPort);
|
||||
// este trozo hay que cambiarlo porque qué cojones
|
||||
String ip = null;
|
||||
try {
|
||||
socket.connect(directoryAddress);
|
||||
ip = socket.getLocalAddress().getHostAddress();
|
||||
socket.disconnect();
|
||||
} catch(Exception e) {}
|
||||
|
||||
DirMessage serve = new DirMessage(DirMessageOps.OPERATION_SERVE, NanoFiles.peerNickname, ip, serverPort);
|
||||
byte[] serveBytes = serve.toString().getBytes();
|
||||
byte[] response = sendAndReceiveDatagrams(serveBytes);
|
||||
String respStr = new String(response, 0, response.length);
|
||||
|
||||
Reference in New Issue
Block a user