Aaron Bieber
4eb467a724
Skip SetKeepAlivePeriod call on OpenBSD
OpenBSD does not have a user-settable per-socket TCP keepalives. This changes
tryKeepAlive to skip attempting set it when on OpenBSD.
https://github.com/golang/go/blob/master/src/net/tcpsockopt_openbsd.go#L13-L14
This prevents thousands of `log.Errorf("Failed set keepalive period: %s",
err)`'s from happening.
3 years ago
Marten Seemann
ff00d9c72b
use log.Warn instead of log.Warning
4 years ago
Marten Seemann
7fae0d63c6
add bandwidth-related metrics (for Linux and OSX)
4 years ago
Marten Seemann
0006048d37
use a fork of mikioh/tcp
4 years ago
Marten Seemann
3cf9d581c9
expose some Prometheus metrics
4 years ago
Marten Seemann
c585e14f87
rename the lingerListener to tcpListener
4 years ago
Marten Seemann
2f74f82607
enable TCP keepalives
4 years ago
Marten Seemann
d9fec436cd
stop using the deprecated go-multiaddr-net package
4 years ago
Steven Allen
503a78e280
fix: don't allow dialing DNS addresses
See https://github.com/libp2p/go-libp2p/issues/841
5 years ago
Yusef Napora
cea811c943
use new insecure transport constructor
5 years ago
Raúl Kripalani
ed7828ceef
migrate to consolidated types ( #40 )
6 years ago
Steven Allen
b06b0e6b21
dep: import go-libp2p-mplex into the libp2p org
6 years ago
Steven Allen
a517f4d213
chore: remove inline interface
(@vyzo CR)
6 years ago
Steven Allen
87f331a7fc
set linger to 0 for both inbound and outbound connections
This causes us to send RST packets instead of FIN packets when closing
connections and means connections immediately enter the "reset" state instead of
entering the TIME-WAIT state.
Importantly, this means we can immediately reuse the 5-tuple and reconnect.
6 years ago
Can ZHANG
e8b9e0d5e3
Deprecate IPFS_REUSEPORT, use LIBP2P_TCP_REUSEPORT
6 years ago
Steven Allen
bd1a6b0bdd
add a TCP connect timeout
7 years ago
Steven Allen
4784a35f52
refactor for transport interface changes
Also, refactor out reuseport logic into a separate package.
7 years ago
Steven Allen
69b7572bb7
set the source IP, but not port, when not using the reuseport dialer
7 years ago
Steven Allen
ec33afbcaa
Revert "fix source address not being set in non REUSEPORT dialer"
This reverts commit af1302af3e
.
If we do this, we end up using the source *port* for dialing. That's not what we
want when not using reuseport.
fixes #19
7 years ago
Steven Allen
5ec6564e7d
gx publish 1.2.6
7 years ago
Steven Allen
0553274379
update go-reuseport
1. Migrate to libp2p repo.
2. Pull in fixes for edge platforms. Related: use `x/sys` instead of `syscall`
when possible.
3. Pull in less complicated and slightly faster dial logic.
7 years ago
Steven Allen
f4deba088c
remove reference to SingleStreamConn
7 years ago
Steven Allen
a7ae57bbfc
Revert "use the renamed transport interfaces"
This reverts commit 21fd167df3
.
7 years ago
Marten Seemann
21fd167df3
use the renamed transport interfaces
7 years ago
Marten Seemann
d7cda66e0f
remove the timeoutOpt
Timeout should only be set by using contexts.
7 years ago
Marten Seemann
d29927f2f7
replace tpt.ConnWrap by a tcpConn
The tpt.ConnWrap is being removed from go-libp2p-transport
8 years ago
Marten Seemann
aaf9fcb713
be explicit about the interfaces implemented
8 years ago
Jakub Sztandera
af1302af3e
fix source address not being set in non REUSEPORT dialer
7 years ago
Jeromy
53da0c05ce
fix panic when reuseport was no available
8 years ago
Jeromy
59530f21f4
clean up reusedial and remove go-libp2p-logging
8 years ago
Jeromy
cfef65cee3
allow nil for dialer laddr
8 years ago
Jeromy
e37704103a
fix ip4 vs ip6 dial failures
8 years ago
Jeromy
9532d3f16a
update deps
8 years ago
Jakub Sztandera
aa9e1d0d7e
fix(govet): correct fmt for bool is %t
8 years ago
Jakub Sztandera
8df46c82c3
fix: use DialContext of go-reuseport
It got skipped when go-reuseport got migrated to context
8 years ago
Jeromy
7c54aa9763
extract tcp transport from go-libp2p-transport
8 years ago