mirror of https://github.com/zlatinb/muwire
add empty constructors for easier testing
parent
29dfc1eeb1
commit
2e18b19d20
|
@ -10,6 +10,7 @@ class HostPool {
|
||||||
def verified = new HashMap()
|
def verified = new HashMap()
|
||||||
def unverified = new HashMap()
|
def unverified = new HashMap()
|
||||||
|
|
||||||
|
HostPool() {}
|
||||||
HostPool(maxFailures, maxAge) {
|
HostPool(maxFailures, maxAge) {
|
||||||
this.maxAge = maxAge
|
this.maxAge = maxAge
|
||||||
this.maxFailures = maxFailures
|
this.maxFailures = maxFailures
|
||||||
|
|
|
@ -7,13 +7,12 @@ import net.i2p.client.datagram.I2PDatagramMaker
|
||||||
class Pinger {
|
class Pinger {
|
||||||
|
|
||||||
final def session
|
final def session
|
||||||
final def maker
|
|
||||||
Pinger(session) {
|
Pinger(session) {
|
||||||
this.session = session
|
this.session = session
|
||||||
this.maker = new I2PDatagramMaker(session)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def ping(host, uuid) {
|
def ping(host, uuid) {
|
||||||
|
def maker = new I2PDatagramMaker(session)
|
||||||
def payload = new HashMap()
|
def payload = new HashMap()
|
||||||
payload.type = "CrawlerPing"
|
payload.type = "CrawlerPing"
|
||||||
payload.version = 1
|
payload.version = 1
|
||||||
|
|
Loading…
Reference in New Issue