Application layer keepalives to detect dead TCP connections.

DuplexOutgoingSession flushes its output stream if it's idle for a
transport-defined interval, causing an empty frame to be sent. The TCP
and Tor plugins use a socket timeout equal to twice the idle interval to
detect dead connections.

See bugs #27, #46 and #60.
This commit is contained in:
akwizgran
2014-12-13 12:00:40 +00:00
parent 3a70aa7653
commit d4fa656dbb
19 changed files with 95 additions and 26 deletions

View File

@@ -7,6 +7,9 @@ import org.briarproject.api.plugins.Plugin;
/** An interface for transport plugins that support duplex communication. */
public interface DuplexPlugin extends Plugin {
/** Returns the transport's maximum idle time in milliseconds. */
long getMaxIdleTime();
/**
* Attempts to create and return a connection to the given contact using
* the current transport and configuration properties. Returns null if a