Add a method for checking whether we can send streams.

This commit is contained in:
akwizgran
2018-03-28 12:08:08 +01:00
parent 798b871cc9
commit f7c2f86499
5 changed files with 53 additions and 15 deletions

View File

@@ -57,6 +57,12 @@ public interface KeyManager {
void removeKeys(Transaction txn, Map<TransportId, KeySetId> keys)
throws DbException;
/**
* Returns true if we have keys that can be used for outgoing streams to
* the given contact over the given transport.
*/
boolean canSendOutgoingStreams(ContactId c, TransportId t);
/**
* Returns a {@link StreamContext} for sending a stream to the given
* contact over the given transport, or null if an error occurs or the