mirror of
https://github.com/binlaab/nanofiles.git
synced 2026-07-01 12:37:20 +02:00
arreglado ping y empezado peerdl y dirdl
This commit is contained in:
@@ -25,6 +25,7 @@ public class PeerMessage {
|
||||
private String filenameVal;
|
||||
|
||||
private byte[] fileData;
|
||||
private int chunkNum;
|
||||
|
||||
|
||||
|
||||
@@ -98,6 +99,14 @@ public class PeerMessage {
|
||||
public void setFileData(byte[] fileData) {
|
||||
this.fileData = fileData;
|
||||
}
|
||||
|
||||
public int getChunkNum() {
|
||||
return chunkNum;
|
||||
}
|
||||
|
||||
public void setChunkNum(int chunkNum) {
|
||||
this.chunkNum = chunkNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Método de clase para parsear los campos de un mensaje y construir el objeto
|
||||
@@ -149,11 +158,14 @@ public class PeerMessage {
|
||||
}
|
||||
|
||||
case PeerMessageOps.OPCODE_REQUEST_PEER_DL: {
|
||||
int longitudSubHash = (int)dis.readByte();
|
||||
// buscar archivo supongo
|
||||
}
|
||||
case PeerMessageOps.OPCODE_PEER_DL: {
|
||||
int longitudSubHash = (int) dis.readByte();
|
||||
byte[] subHash = new byte[longitudSubHash];
|
||||
dis.readFully(subHash);
|
||||
break;
|
||||
// buscar archivo supongo
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user