Simple TCP socket plugin (untested).

This commit is contained in:
akwizgran
2011-10-06 09:17:22 +01:00
parent 80cba1e7f7
commit 45fd4c9060
10 changed files with 261 additions and 25 deletions

View File

@@ -1,7 +1,6 @@
package net.sf.briar.api.transport.batch;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.TransportId;
import net.sf.briar.api.transport.TransportCallback;
/**
@@ -12,6 +11,5 @@ public interface BatchTransportCallback extends TransportCallback {
void readerCreated(BatchTransportReader r);
void writerCreated(ContactId contactId, TransportId t, long connection,
BatchTransportWriter w);
void writerCreated(ContactId contactId, BatchTransportWriter w);
}

View File

@@ -50,10 +50,10 @@ public interface BatchTransportPlugin {
boolean shouldPoll();
/**
* Returns the desired interval in seconds between calls to the plugin's
* poll() method.
* Returns the desired interval in milliseconds between calls to the
* plugin's poll() method.
*/
int getPollingInterval();
long getPollingInterval();
/**
* Attempts to establish incoming and/or outgoing connections using the

View File

@@ -1,7 +1,6 @@
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.TransportCallback;
/**
@@ -12,6 +11,6 @@ public interface StreamTransportCallback extends TransportCallback {
void incomingConnectionCreated(StreamTransportConnection c);
void outgoingConnectionCreated(ContactId contactId, TransportId t,
long connection, StreamTransportConnection c);
void outgoingConnectionCreated(ContactId contactId,
StreamTransportConnection c);
}

View File

@@ -28,5 +28,5 @@ public interface StreamTransportConnection {
* connection is not used, or if an exception is thrown while using the
* connection.
*/
void close() throws IOException;
void dispose() throws IOException;
}

View File

@@ -49,10 +49,10 @@ public interface StreamTransportPlugin {
boolean shouldPoll();
/**
* Returns the desired interval in seconds between calls to the plugin's
* poll() method.
* Returns the desired interval in milliseconds between calls to the
* plugin's poll() method.
*/
int getPollingInterval();
long getPollingInterval();
/**
* Attempts to establish connections using the current transport and