mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Refactored transport component and renamed WritersModule.
The goal of the refactoring was to clean up the dependencies of IncomingBatchConnection and OutgoingBatchConnection.
This commit is contained in:
@@ -11,10 +11,6 @@ public interface ConnectionWriter {
|
||||
*/
|
||||
OutputStream getOutputStream();
|
||||
|
||||
/**
|
||||
* Returns the number of bytes that can be written to this writer without
|
||||
* outputting more than the given number of bytes, including encryption and
|
||||
* authentication overhead.
|
||||
*/
|
||||
long getCapacity(long capacity);
|
||||
/** Returns the maximum number of bytes that can be written. */
|
||||
long getCapacity();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.OutputStream;
|
||||
|
||||
public interface ConnectionWriterFactory {
|
||||
|
||||
ConnectionWriter createConnectionWriter(OutputStream out, boolean initiator,
|
||||
int transportId, long connection, byte[] secret);
|
||||
ConnectionWriter createConnectionWriter(OutputStream out,
|
||||
long capacity, boolean initiator, int transportId, long connection,
|
||||
byte[] secret);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.io.InputStream;
|
||||
public interface BatchTransportReader {
|
||||
|
||||
/** Returns an input stream for reading from the transport. */
|
||||
InputStream getInputStream() throws IOException;
|
||||
InputStream getInputStream();
|
||||
|
||||
/**
|
||||
* Closes the reader and disposes of any associated state. This method must
|
||||
|
||||
@@ -10,10 +10,10 @@ import java.io.OutputStream;
|
||||
public interface BatchTransportWriter {
|
||||
|
||||
/** Returns the maximum number of bytes that can be written. */
|
||||
long getCapacity() throws IOException;
|
||||
long getCapacity();
|
||||
|
||||
/** Returns an output stream for writing to the transport. */
|
||||
OutputStream getOutputStream() throws IOException;
|
||||
OutputStream getOutputStream();
|
||||
|
||||
/**
|
||||
* Closes the writer and disposes of any associated state. This method must
|
||||
|
||||
Reference in New Issue
Block a user