Juan Batiz-Benet
93655b428c
p2p/net: notify on listens
...
Network now signals when it successfully listens on some address
or when an address shuts down. This will be used to establish and
close nat port mappings. It could also be used to notify peers
of address changes.
2015-01-30 20:37:52 -08:00
Brian Tiger Chow
320d060948
log(secio) rm handshake console log (still has event log)
2015-01-30 06:57:41 -08:00
Brian Tiger Chow
3d43649d83
Merge pull request #699 from jbenet/net-set-listener
...
p2p/net: network interface Listen func
2015-01-30 06:52:14 -08:00
Juan Batiz-Benet
bfe998f3e1
p2p/net: network interface Listen func
...
network interface now allows setting Listeners after the fact.
This is useful to create the network and start listening as
separate steps. And to keep the network up to date on new
addresses the node might have to listen to.
2015-01-30 06:51:29 -08:00
Juan Batiz-Benet
f97f60a39c
p2p/net: network interface Listen func
...
network interface now allows setting Listeners after the fact.
This is useful to create the network and start listening as
separate steps. And to keep the network up to date on new
addresses the node might have to listen to.
2015-01-30 04:13:02 -08:00
Jeromy
704625bceb
fix nil pointer panic on version strings in ID message
2015-01-29 23:07:32 +00:00
Juan Batiz-Benet
39e858b0e9
swarm: TestSimultOpenMany has problems in CI.
...
dialing 4000 connections somehow keeps choking both travis and
jenkins. dialing this down to 500
2015-01-29 01:25:54 -08:00
Juan Batiz-Benet
bb57cf7795
p2p/net/swarm: fix TestDialBackoff
...
- attempts set to 1 now.
- timeouts must account for that.
2015-01-28 15:49:54 -08:00
Juan Batiz-Benet
9316957122
Merge pull request #676 from jbenet/dial-events
...
p2p/net: dial log -> events
2015-01-28 02:25:56 -08:00
Juan Batiz-Benet
837fca7bd4
p2p/net: cleaned up dial events
...
+ fixed race
2015-01-28 02:15:32 -08:00
Juan Batiz-Benet
96cad1347f
p2p/net: better dial log.Event
2015-01-28 00:13:42 -08:00
Brian Tiger Chow
9510082ee2
remove message
2015-01-27 16:24:36 -08:00
Juan Batiz-Benet
d53edf1763
p2p/net: dial log -> events
...
This commit turns all dial logs into log.Events.
Everything's great except for one problem:
The LoggableMap I'm using does not print out things
correctly. I gave it peer.IDs, and Multiaddrs
and both got logged as nothing `{}` (didn't even call
their String() methods!) So, for now, this function
encodes it when called... This is wrong and should be
fixed before being merged in. Otherwise we will be
constantly encoding peer.IDs and Multiaddrs without
needing to.
@briantigerchow how do you suggest doing this?
I don't know my way around your Loggable.
2015-01-27 01:35:37 -08:00
Juan Batiz-Benet
9316acfaf7
p2p/peer/peerstore: mu position + comment
2015-01-26 22:47:44 -08:00
Juan Batiz-Benet
50c72a6765
p2p/peer/addr: addrbook RLock fix
2015-01-26 22:01:26 -08:00
Juan Batiz-Benet
8ae932da44
p2p/peer: addresses expire after an hour
2015-01-26 19:23:42 -08:00
Juan Batiz-Benet
77a9168a18
p2p/id: SET listen addrs, clearing old ones.
2015-01-26 19:23:42 -08:00
Juan Batiz-Benet
c7c0445ba1
p2p/peer: addressbook can now clear addrs
2015-01-26 19:23:42 -08:00
Juan Batiz-Benet
e598cf2b77
dropped down log.Errors
2015-01-26 19:13:44 -08:00
Juan Batiz-Benet
ae0386cfba
user friendliness in logs + output
2015-01-26 17:01:00 -08:00
Juan Batiz-Benet
44fe2f0709
p2p/host: doc options
2015-01-26 15:02:32 -08:00
Juan Batiz-Benet
d7a5d2ecd2
p2p: own addresses gotten from host
2015-01-26 14:00:00 -08:00
Juan Batiz-Benet
8a2f08f32e
p2p/net/conn: reuse timeout is real error
...
should be returning false.
2015-01-26 14:00:00 -08:00
Juan Batiz-Benet
3b5d1164c8
p2p/nat: managed by host now.
...
Exposing the NAT to the core is unnecessary. The Host can take
care of it. If a need emerges, we can address it then.
2015-01-26 14:00:00 -08:00
Juan Batiz-Benet
afaddf4c8b
p2p/nat: re-factors nat object
...
- allow retrieving addresses
- allow notifications on mapping changes
- allow lifecycle mgmt (future commit will manage it)
2015-01-26 13:45:02 -08:00
Juan Batiz-Benet
33a944bc5b
p2p/nat: upnp + pmp
2015-01-24 12:42:22 -08:00
Juan Batiz-Benet
382daf3d7f
Merge pull request #640 from jbenet/races
...
more races 2015-01-24
2015-01-24 10:49:42 -08:00
Juan Batiz-Benet
ef4fb9dd10
p2p/net/swarm: TestDialBackoffClears CI Timeout
...
increased the timeout for other CI too
2015-01-24 10:41:13 -08:00
Juan Batiz-Benet
ffc7eac22d
p2p/net/dial: fixed data race
2015-01-24 10:22:56 -08:00
Juan Batiz-Benet
992c520a25
p2p/net/swarm: notifications
2015-01-24 09:13:44 -08:00
Brian Tiger Chow
95f2f8cb75
remove prefix logger
2015-01-24 00:30:56 -08:00
Jeromy
bb4ad4494b
really ugly impl of 'ipfs dht query' command
2015-01-24 03:56:45 +00:00
Juan Batiz-Benet
b20f767eb4
p2p/net/conn: timeouts are real failures.
2015-01-23 05:25:32 -08:00
Juan Batiz-Benet
bdda7ff6b6
p2p/proto/id: more helpful log
2015-01-23 02:08:29 -08:00
Juan Batiz-Benet
07d52b3351
p2p/proto/mux: make log more useful
2015-01-23 02:08:29 -08:00
Juan Batiz-Benet
33dcef5f89
p2p/net/swarm + conn: logs + debugerr output
2015-01-23 01:52:42 -08:00
Juan Batiz-Benet
d5a3bf1fa8
p2p/net/swarm: half the timeout of dial
2015-01-23 01:52:41 -08:00
Juan Batiz-Benet
dec34b48e3
p2p/net/swarm/addr: check for nil addr
2015-01-23 01:46:56 -08:00
Juan Batiz-Benet
3037ac2e34
p2p/net/conn: only reuseport if avail
2015-01-20 19:46:44 -08:00
Juan Batiz-Benet
e77e4b1357
p2p/test/reconnect: fixed race condition
2015-01-20 10:57:45 -08:00
Juan Batiz-Benet
6012b8675c
p2p/net/conn: cleaner reuse port setup
...
This commit cleans up the reuse port setup, and fixes a problem:
make sure to filter addrs out that we simply cannot dial with
(e.g. loopback -> non-loopback, or linklocal -> nonlinklocal)
2015-01-19 23:18:52 -08:00
Juan Batiz-Benet
c91463e43f
p2p/net/conn: log when reuse fails
2015-01-19 23:18:52 -08:00
Juan Batiz-Benet
958eecfe46
p2p/proto/identify: use observed listen addrs
...
This commit finally makes use of the sent observed addrs.
If the connection's local address is from one of our
listen addrs, then the remote's observed addr is its
natted mapping, which is useful to us. For now, we add
it directly to our address book. (a future commit should
make addressbook addresses expire)
2015-01-19 23:18:51 -08:00
Juan Batiz-Benet
11b94db5e3
p2p/test/reconnects: faster tests
2015-01-19 23:18:51 -08:00
Juan Batiz-Benet
51f5bce55b
p2p/net/conn: use reuseport
2015-01-19 23:18:51 -08:00
Brian Tiger Chow
1c3448efd6
rm unused proto
...
cc @jbenet @whyrusleeping
2015-01-18 14:41:42 -08:00
Brian Tiger Chow
bb0dc22735
eventlog: rm noisy low-signal statement
2015-01-18 14:41:42 -08:00
Brian Tiger Chow
36444ac75f
hold lock during map access
2015-01-18 14:33:41 -08:00
Brian Tiger Chow
f54e0c74ab
move generic packages to thirdparty (see thirdparty/README.md)
2015-01-18 14:04:45 -08:00
Jeromy
9c45696a4b
rewrite as single line defer logs
2015-01-15 04:45:34 +00:00