mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Interrupt messaging session if contact or transport is removed.
This commit is contained in:
@@ -6,14 +6,13 @@ public interface MessagingSession {
|
||||
|
||||
/**
|
||||
* Runs the session. This method returns when there are no more packets to
|
||||
* send or when the {@link #interrupt()} method has been called.
|
||||
* send or receive, or when the {@link #interrupt()} method has been called.
|
||||
*/
|
||||
void run() throws IOException;
|
||||
|
||||
/**
|
||||
* Interrupts the session, causing the {@link #run()} method to return at
|
||||
* the next opportunity or throw an {@link java.io.IOException IOException}
|
||||
* if it cannot return cleanly.
|
||||
* the next opportunity.
|
||||
*/
|
||||
void interrupt();
|
||||
}
|
||||
|
||||
@@ -8,8 +8,9 @@ import org.briarproject.api.TransportId;
|
||||
|
||||
public interface MessagingSessionFactory {
|
||||
|
||||
MessagingSession createIncomingSession(ContactId c, InputStream in);
|
||||
MessagingSession createIncomingSession(ContactId c, TransportId t,
|
||||
InputStream in);
|
||||
|
||||
MessagingSession createOutgoingSession(ContactId c, TransportId t,
|
||||
long maxLatency, OutputStream out, boolean duplex);
|
||||
long maxLatency, boolean duplex, OutputStream out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user