introduce Endpoint concept for i2p endpoints
This commit is contained in:
@@ -7,18 +7,13 @@ import net.i2p.data.Destination
|
||||
abstract class Connection {
|
||||
|
||||
final EventBus eventBus
|
||||
final InputStream inputStream
|
||||
final OutputStream outputStream
|
||||
final Destination remoteSide
|
||||
final Endpoint endpoint
|
||||
final boolean incoming
|
||||
|
||||
Connection(EventBus eventBus, InputStream inputStream, OutputStream outputStream,
|
||||
Destination remoteSide, boolean incoming) {
|
||||
Connection(EventBus eventBus, Endpoint endpoint, boolean incoming) {
|
||||
this.eventBus = eventBus
|
||||
this.inputStream = inputStream
|
||||
this.outputStream = outputStream
|
||||
this.remoteSide = remoteSide
|
||||
this.incoming = incoming
|
||||
this.endpoint = endpoint
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -0,0 +1,15 @@
|
||||
package com.muwire.core.connection
|
||||
|
||||
import net.i2p.data.Destination
|
||||
|
||||
class Endpoint {
|
||||
final Destination destination
|
||||
final InputStream inputStream
|
||||
final OutputStream outputStream
|
||||
|
||||
Endpoint(Destination destination, InputStream inputStream, OutputStream outputStream) {
|
||||
this.destination = destination
|
||||
this.inputStream = inputStream
|
||||
this.outputStream = outputStream
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
package com.muwire.core.connection
|
||||
|
||||
import net.i2p.data.Destination
|
||||
|
||||
class I2PConnector {
|
||||
|
||||
Endpoint connect(Destination dest) {
|
||||
//TODO implement
|
||||
null
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user