mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Merge branch 'aggressive-polling' into 'master'
Try harder to connect to contacts * When an outgoing connection is lost, try to reconnect to the contact straight away * Use periodic polling for Tor, regardless of whether our hidden service descriptor has been published * Reduce polling intervals for all plugins (this can be reverted if we solve the connectivity issues) Closes #262, #314. Hopefully helps with #361. See merge request !177
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
|
||||
public class ConnectionClosedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final TransportId transportId;
|
||||
private final boolean incoming;
|
||||
|
||||
public ConnectionClosedEvent(ContactId contactId, TransportId transportId,
|
||||
boolean incoming) {
|
||||
this.contactId = contactId;
|
||||
this.transportId = transportId;
|
||||
this.incoming = incoming;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
|
||||
public TransportId getTransportId() {
|
||||
return transportId;
|
||||
}
|
||||
|
||||
public boolean isIncoming() {
|
||||
return incoming;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
|
||||
public class ConnectionOpenedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final TransportId transportId;
|
||||
private final boolean incoming;
|
||||
|
||||
public ConnectionOpenedEvent(ContactId contactId, TransportId transportId,
|
||||
boolean incoming) {
|
||||
this.contactId = contactId;
|
||||
this.transportId = transportId;
|
||||
this.incoming = incoming;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
|
||||
public TransportId getTransportId() {
|
||||
return transportId;
|
||||
}
|
||||
|
||||
public boolean isIncoming() {
|
||||
return incoming;
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,9 @@ import java.util.Collection;
|
||||
*/
|
||||
public interface ConnectionRegistry {
|
||||
|
||||
void registerConnection(ContactId c, TransportId t);
|
||||
void registerConnection(ContactId c, TransportId t, boolean incoming);
|
||||
|
||||
void unregisterConnection(ContactId c, TransportId t);
|
||||
void unregisterConnection(ContactId c, TransportId t, boolean incoming);
|
||||
|
||||
Collection<ContactId> getConnectedContacts(TransportId t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user