Raúl Kripalani
d87f89314c
Consolidate abstractions and core types into go-libp2p-core ( #601 )
2019-05-26 22:55:46 +01:00
vyzo
3437213b5f
close connection manager
2019-05-21 14:03:28 +03:00
vyzo
b8616c65b3
use cancelable background context in identify
2019-05-07 21:33:19 +03:00
vyzo
f17a4a8667
preallocate map in sameAddrs
2019-04-19 20:03:53 +03:00
vyzo
ebc5d16f5d
use a map in sameAddrs to avoid quadratic behaviour
2019-04-19 20:03:53 +03:00
vyzo
c73f68bdb4
explicit Start method for basic host
2019-04-19 20:03:53 +03:00
vyzo
5845909754
add initialization delay in basic host background task
2019-04-19 20:03:53 +03:00
vyzo
7502fc44c9
add a background task in basic host that periodically pushes identify if needed
2019-04-19 20:03:53 +03:00
vyzo
b8a152f593
use a background worker for updating/gcing the observed address set
2019-04-09 12:44:13 +03:00
Steven Allen
3617750071
better nat mapping
...
1. Update to work with https://github.com/libp2p/go-libp2p-nat/pull/14 .
2. Avoid observed addrs when our NAT tells us about external addrs.
3. Ignore bad addrs reported by our NAT. Substitute with observed addrs.
4. Fix https://github.com/libp2p/go-libp2p/issues/428 .
2019-03-06 10:56:49 -08:00
Matt Joiner
3b8d83ffdc
Resolve addrs with P2P instead of IPFS ( #539 )
2019-02-16 12:43:11 +11:00
vyzo
5d8988f3ee
add comment about the unstable nature of BasicHost.PushIdentify
2018-11-04 10:52:29 +02:00
vyzo
a89e74a155
basic host: export AddrsFactory, provide method to push identify
2018-11-04 10:52:29 +02:00
vyzo
0fa1c25479
ping service in basic host
2018-10-19 12:28:58 +03:00
Steven Allen
27f502e525
Merge pull request #443 from libp2p/fix/log-spam
...
downgrade protocol mux failure log to debug
2018-10-04 17:41:02 -07:00
vyzo
e7fc8861f9
downgrade protocol mux failure log to debug
2018-10-01 10:34:39 +03:00
Can ZHANG
92ec4b2d18
Updates due to code review
2018-09-29 20:16:09 +08:00
Can ZHANG
e6b1e07f11
Updates due to code review
2018-09-13 11:38:16 +08:00
Can ZHANG
ef51fdbe09
Deduplicate addresses of host output
2018-09-07 16:06:16 +08:00
Steven Allen
74486ec970
Merge pull request #352 from libp2p/nit/optimize
...
check for connectedness using Connectedness
2018-06-14 18:44:06 +00:00
Łukasz Kurowski
39791b176c
function cannot be formatted as string
2018-06-12 21:39:29 +02:00
Steven Allen
a361bf0394
check for connectedness using Connectedness
...
(counting open connections requires copying)
2018-06-09 10:23:09 -07:00
Steven Allen
41c6834850
refactor for transport changes
...
Also, make the libp2p constructor fully useful. There should now be no need to
manually construct a swarm/host.
2018-06-04 21:22:24 -07:00
Jakub Sztandera
b6ae1d152a
misc: downgrade a warning to info
...
It is source of most warning noise in Warning channel and we would like
to enable warning channel some time in future by default
2018-03-27 20:46:27 +02:00
Steven Allen
62f92f7e73
always make the host context cancelable
...
There's really no reason to *only* do this if we have relays enabled. Doing it
this way makes `go vet` happier and reduces conditional logic.
2017-11-16 17:34:48 -08:00
Jeromy
85d0247d16
use connmgr interface instead of connmgr directly
2017-10-06 04:39:17 -07:00
Jakub Sztandera
0bef0c7426
Merge pull request #232 from libp2p/fix/log-message
...
basic_host: fix warning message
2017-09-21 13:27:35 +02:00
vyzo
ecb14089a7
basic_host: fix warning message
2017-09-21 12:10:37 +03:00
Steven Allen
7cdd4bc984
Reset on error in basic_host
2017-09-13 15:49:53 -07:00
Lars Gierth
e0c5c22dbc
Avoid unneccessary multiaddr resolutions
2017-08-07 05:08:01 +02:00
Lars Gierth
0c23c9684c
Resolve /dns4, /dns6, /dnsaddr multiaddrs
2017-08-07 05:07:58 +02:00
vyzo
6be81d34c1
basic_host: take base context as parameter in NewHost
2017-08-02 11:04:59 +03:00
vyzo
fd23cf6fa5
basic_host: add the relay after the host construction is complete
2017-08-02 10:58:28 +03:00
vyzo
7f1ffcbd4e
basic_host: NewHost: don't panic on relay errors, return an error instead
...
The legacy interface stays unchanged with a panic though.
2017-08-01 19:36:09 +03:00
vyzo
3b6d61122f
basic_host: integrate circuit relay as a transport with an option
2017-08-01 19:36:09 +03:00
Jeromy
665234f694
WIP: add ConnManager interface method
2017-07-11 23:20:27 -07:00
Enzo Haussecker
e9c24fdc2d
Create interface for NAT manager
2017-06-04 21:33:27 -07:00
Enzo Haussecker
e571f8a3fb
Publicize NAT manager struct
2017-06-03 04:32:47 -07:00
Lars Gierth
f0453a2458
basichost: refactor BasicHost construction
...
There were previously 4 different ways of passing various options
into BasicHost construction.
1. Function parameters to New
2. Option parameters to New
3. Global variables, e.g. NegotiateTimeout
4. Options struct, in the calling code in go-ipfs
This changeset deprecated all of these, and introduces the HostOpts
struct to replace them. It also introduces a new constructor called
NewHost, which accepts a *HostOpts.
The old New constructor continues to work the same way,
but is from now on deprecated too.
2017-05-31 02:30:29 +02:00
Lars Gierth
6cbb93905b
basichost: allow overriding Addrs()
2017-05-30 20:39:08 +02:00
Lars Gierth
12f881c55a
Remove unused and unfit relay protocol
2017-03-12 03:37:01 +01:00
Jeromy
31557da822
fix multistream import paths
2017-01-10 07:22:30 -08:00
Jeromy
104c97ed57
update go-multistream and use negotiateLazy to allow for readonly streams
2017-01-05 08:10:26 -08:00
Jeromy Johnson
9183b8afcf
Merge pull request #150 from libp2p/feat/negotiate-timeouts
...
add negotiate timeout option to basichost
2016-11-10 17:05:44 -08:00
Jeromy
6bccc8c1f5
fix dial log
2016-11-10 16:01:42 -08:00
Jeromy
4f17a651d1
add negotiate timeout option to basichost
2016-11-10 12:40:38 -08:00
Jeromy
077aae473b
make bandwidth metrics optional
2016-11-09 16:26:19 -08:00
Jeromy
6f804db71e
update dependencies and add deadline methods to streams
2016-11-08 13:11:02 -08:00
Jeromy
232864175d
make sure to always close streams when youre done with them
2016-11-05 15:26:07 -07:00
Jeromy
70872ff663
update deps
2016-10-04 21:18:07 -07:00