mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
StreamConnectionFactory and ConnectionDispatcherImpl (untested).
This commit is contained in:
@@ -2,8 +2,13 @@ package net.sf.briar.api.transport;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.sf.briar.api.TransportId;
|
||||
|
||||
public interface ConnectionReaderFactory {
|
||||
|
||||
ConnectionReader createConnectionReader(InputStream in, byte[] encryptedIv,
|
||||
byte[] secret);
|
||||
|
||||
ConnectionReader createConnectionReader(InputStream in, boolean initiator,
|
||||
TransportId t, long connection, byte[] secret);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import net.sf.briar.api.TransportId;
|
||||
|
||||
public interface ConnectionWriterFactory {
|
||||
|
||||
ConnectionWriter createConnectionWriter(OutputStream out,
|
||||
long capacity, boolean initiator, TransportId t, long connection,
|
||||
byte[] secret);
|
||||
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
|
||||
boolean initiator, TransportId t, long connection, byte[] secret);
|
||||
|
||||
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
|
||||
byte[] encryptedIv, byte[] secret);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import net.sf.briar.api.transport.BatchTransportWriter;
|
||||
|
||||
public interface BatchConnectionFactory {
|
||||
|
||||
Runnable createOutgoingConnection(TransportId t, ContactId c,
|
||||
BatchTransportWriter w);
|
||||
|
||||
Runnable createIncomingConnection(ContactId c, BatchTransportReader r,
|
||||
byte[] encryptedIv);
|
||||
|
||||
Runnable createOutgoingConnection(TransportId t, ContactId c,
|
||||
BatchTransportWriter w);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package net.sf.briar.api.transport.stream;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.TransportId;
|
||||
import net.sf.briar.api.transport.StreamTransportConnection;
|
||||
|
||||
public interface StreamConnectionFactory {
|
||||
|
||||
Runnable[] createIncomingConnection(ContactId c,
|
||||
StreamTransportConnection s, byte[] encryptedIv);
|
||||
|
||||
Runnable[] createOutgoingConnection(TransportId t, ContactId c,
|
||||
StreamTransportConnection s);
|
||||
}
|
||||
Reference in New Issue
Block a user