mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Allow plugins to use different maximum frame lengths.
This commit is contained in:
@@ -14,6 +14,9 @@ public interface Plugin {
|
||||
/** Returns a label for looking up the plugin's translated name. */
|
||||
String getName();
|
||||
|
||||
/** Returns the transport's maximum frame length in bytes. */
|
||||
int getMaxFrameLength();
|
||||
|
||||
/** Returns the transport's maximum latency in milliseconds. */
|
||||
long getMaxLatency();
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ import java.io.OutputStream;
|
||||
*/
|
||||
public interface DuplexTransportConnection {
|
||||
|
||||
/** Returns the maximum frame length of the transport in bytes. */
|
||||
int getMaxFrameLength();
|
||||
|
||||
/** Returns the maximum latency of the transport in milliseconds. */
|
||||
long getMaxLatency();
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@ import java.io.InputStream;
|
||||
*/
|
||||
public interface SimplexTransportReader {
|
||||
|
||||
/** Returns the maximum frame length of the transport in bytes. */
|
||||
int getMaxFrameLength();
|
||||
|
||||
/** Returns an input stream for reading from the transport. */
|
||||
InputStream getInputStream() throws IOException;
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ public interface SimplexTransportWriter {
|
||||
/** Returns the capacity of the transport in bytes. */
|
||||
long getCapacity();
|
||||
|
||||
/** Returns the maximum frame length of the transport in bytes. */
|
||||
int getMaxFrameLength();
|
||||
|
||||
/** Returns the maximum latency of the transport in milliseconds. */
|
||||
long getMaxLatency();
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import java.io.InputStream;
|
||||
public interface ConnectionReaderFactory {
|
||||
|
||||
/** Creates a connection reader for one side of a connection. */
|
||||
ConnectionReader createConnectionReader(InputStream in,
|
||||
ConnectionReader createConnectionReader(InputStream in, int maxFrameLength,
|
||||
ConnectionContext ctx, boolean incoming, boolean initiator);
|
||||
|
||||
/** Creates a connection reader for one side of an invitation connection. */
|
||||
ConnectionReader createInvitationConnectionReader(InputStream in,
|
||||
byte[] secret, boolean alice);
|
||||
int maxFrameLength, byte[] secret, boolean alice);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import java.io.OutputStream;
|
||||
public interface ConnectionWriterFactory {
|
||||
|
||||
/** Creates a connection writer for one side of a connection. */
|
||||
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
|
||||
ConnectionContext ctx, boolean incoming, boolean initiator);
|
||||
ConnectionWriter createConnectionWriter(OutputStream out,
|
||||
int maxFrameLength, long capacity, ConnectionContext ctx,
|
||||
boolean incoming, boolean initiator);
|
||||
|
||||
/** Creates a connection writer for one side of an invitation connection. */
|
||||
ConnectionWriter createInvitationConnectionWriter(OutputStream out,
|
||||
byte[] secret, boolean alice);
|
||||
int maxFrameLength, byte[] secret, boolean alice);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user