mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Store each connection window slot as a database row.
This is less memory-efficient but necessary for the coming forward secrecy changes.
This commit is contained in:
@@ -48,4 +48,7 @@ public interface ProtocolConstants {
|
||||
|
||||
/** The length of a message's random salt in bytes. */
|
||||
static final int SALT_LENGTH = 8;
|
||||
|
||||
/** The size of the connection reordering window. */
|
||||
static final int CONNECTION_WINDOW_SIZE = 32;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,9 @@ import java.util.Collection;
|
||||
|
||||
public interface ConnectionWindow {
|
||||
|
||||
long getCentre();
|
||||
|
||||
int getBitmap();
|
||||
|
||||
boolean isSeen(long connection);
|
||||
|
||||
void setSeen(long connection);
|
||||
|
||||
Collection<Long> getUnseenConnectionNumbers();
|
||||
Collection<Long> getUnseen();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface ConnectionWindowFactory {
|
||||
|
||||
ConnectionWindow createConnectionWindow(long centre, int bitmap);
|
||||
ConnectionWindow createConnectionWindow();
|
||||
|
||||
ConnectionWindow createConnectionWindow(Collection<Long> unseen);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.sf.briar.api.protocol.TransportIndex;
|
||||
|
||||
public interface StreamConnectionFactory {
|
||||
|
||||
void createIncomingConnection(TransportIndex i, ContactId c,
|
||||
void createIncomingConnection(TransportIndex i, ContactId c,
|
||||
StreamTransportConnection s, byte[] encryptedIv);
|
||||
|
||||
void createOutgoingConnection(TransportIndex i, ContactId c,
|
||||
|
||||
Reference in New Issue
Block a user