Skip to content

Commit 144683f

Browse files
committed
going to store asap hop list with chunks and transmit with assimilate pdu.
1 parent 1722ef5 commit 144683f

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

src/net/sharksystem/asap/engine/ASAPEngine.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ private void sendChunks(CharSequence sender, String encounteredPeer, ASAPChunkSt
793793
workingEra, // era ok
794794
chunk.getLength(), // data length
795795
chunk.getOffsetList(),
796+
chunk.getASAPHopList(),
796797
chunk.getMessageInputStream(),
797798
os,
798799
this.getASAPCommunicationCryptoSettings());

src/net/sharksystem/asap/engine/ASAPInternalChunk.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import net.sharksystem.asap.ASAPChannel;
44
import net.sharksystem.asap.ASAPChunk;
5+
import net.sharksystem.asap.ASAPHop;
56

67
import java.io.IOException;
78
import java.io.InputStream;
@@ -83,4 +84,6 @@ public interface ASAPInternalChunk extends ASAPChunk {
8384
List<CharSequence> getDeliveredTo();
8485

8586
void copyMetaData(ASAPChannel channel) throws IOException;
87+
88+
List<ASAPHop> getASAPHopList();
8689
}

src/net/sharksystem/asap/engine/ASAPInternalChunkFS.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ public void copyMetaData(ASAPChannel channel) throws IOException {
5151
this.saveStatus();
5252
}
5353

54+
@Override
55+
public List<ASAPHop> getASAPHopList() {
56+
return this.hopList;
57+
}
58+
5459
public HashMap<String, String> getExtraData() {
5560
return this.extraData;
5661
}

src/net/sharksystem/asap/protocol/ASAP_1_0.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.sharksystem.asap.protocol;
22

33
import net.sharksystem.asap.ASAPException;
4+
import net.sharksystem.asap.ASAPHop;
45
import net.sharksystem.asap.ASAPSecurityException;
56
import net.sharksystem.asap.crypto.ASAPPoint2PointCryptoSettings;
67

@@ -160,8 +161,9 @@ void assimilate(CharSequence sender, CharSequence recipient, CharSequence format
160161
throws IOException, ASAPException;
161162

162163

163-
public void assimilate(CharSequence sender, CharSequence recipient, CharSequence format,
164-
CharSequence channel, int era, long length, List<Long> offsets, InputStream dataIS,
164+
void assimilate(CharSequence sender, CharSequence recipient, CharSequence format,
165+
CharSequence channel, int era, long length, List<Long> offsets, List<ASAPHop> asapHopList,
166+
InputStream dataIS,
165167
OutputStream os, ASAPPoint2PointCryptoSettings secureSetting) throws IOException, ASAPException;
166168

167169
/**

src/net/sharksystem/asap/protocol/ASAP_Modem_Impl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.sharksystem.asap.protocol;
22

33
import net.sharksystem.asap.ASAPException;
4+
import net.sharksystem.asap.ASAPHop;
45
import net.sharksystem.asap.ASAPSecurityException;
56
import net.sharksystem.asap.engine.ASAPUndecryptableMessageHandler;
67
import net.sharksystem.asap.crypto.ASAPCryptoAlgorithms;
@@ -148,8 +149,11 @@ public void assimilate(CharSequence sender, CharSequence recipient, CharSequence
148149

149150
@Override
150151
public void assimilate(CharSequence sender, CharSequence recipient, CharSequence format,
151-
CharSequence channel, int era, long length, List<Long> offsets, InputStream dataIS,
152-
OutputStream os, ASAPPoint2PointCryptoSettings secureSetting) throws IOException, ASAPException {
152+
CharSequence channel, int era, long length, List<Long> offsets, List<ASAPHop> asapHops,
153+
InputStream dataIS, OutputStream os,
154+
ASAPPoint2PointCryptoSettings secureSetting)
155+
156+
throws IOException, ASAPException {
153157

154158
this.assimilate(sender, recipient, format, channel, era, length, offsets, dataIS, os,
155159
secureSetting.mustSign(), secureSetting.mustEncrypt());

0 commit comments

Comments
 (0)