mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Factory methods for segmented connection writers.
This commit is contained in:
@@ -136,7 +136,7 @@ public class ProtocolIntegrationTest extends BriarTestCase {
|
||||
private byte[] write() throws Exception {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ConnectionWriter conn = connectionWriterFactory.createConnectionWriter(
|
||||
out, Long.MAX_VALUE, secret.clone());
|
||||
out, Long.MAX_VALUE, secret.clone(), true);
|
||||
OutputStream out1 = conn.getOutputStream();
|
||||
ProtocolWriter writer = protocolWriterFactory.createProtocolWriter(out1,
|
||||
false);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ConnectionWriterTest extends BriarTestCase {
|
||||
ByteArrayOutputStream out =
|
||||
new ByteArrayOutputStream(MIN_CONNECTION_LENGTH);
|
||||
ConnectionWriter w = connectionWriterFactory.createConnectionWriter(out,
|
||||
MIN_CONNECTION_LENGTH, secret);
|
||||
MIN_CONNECTION_LENGTH, secret, true);
|
||||
// Check that the connection writer thinks there's room for a packet
|
||||
long capacity = w.getRemainingCapacity();
|
||||
assertTrue(capacity >= MAX_PACKET_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user