Commit Graph

37 Commits

Author SHA1 Message Date
Juan Batiz-Benet
ccf6f79aa0 respect don contexteone 2014-12-24 03:24:28 -08:00
Juan Batiz-Benet
b61b281eae net/conns better printing of connections 2014-12-23 08:53:28 -08:00
Juan Batiz-Benet
4d9f1f0fdf net: Connectedness bugfix
Connectedness was totally incorrect. added a test case.
2014-12-23 08:50:24 -08:00
Juan Batiz-Benet
7952d95bbf added bootstrap logging 2014-12-23 08:48:58 -08:00
Juan Batiz-Benet
4fe1dd9b62 net: have an explicit IdentifyConn on dial
- Make sure we call IdentifyConn on dialed out conns
- we wait until the identify is **done** before return
- on listening case, we can also wait.
- tests now make sure dial does wait.
- tests now make sure we can wait on listening case.
2014-12-23 08:40:52 -08:00
Juan Batiz-Benet
c84a714b16 peer change: peer.Peer -> peer.ID
this is a major refactor of the entire codebase
it changes the monolithic peer.Peer into using
a peer.ID and a peer.Peerstore.

Other changes:
- removed handshake3.
-	testutil vastly simplified peer
-	secio bugfix + debugging logs
-	testutil: RandKeyPair
-	backpressure bugfix: w.o.w.
-	peer: added hex enc/dec
-	peer: added a PeerInfo struct
  PeerInfo is a small struct used to pass around a peer with
 	a set of addresses and keys. This is not meant to be a
 	complete view of the system, but rather to model updates to
 	the peerstore. It is used by things like the routing system.
-	updated peer/queue + peerset
-	latency metrics
-	testutil: use crand for PeerID gen
 	RandPeerID generates random "valid" peer IDs. it does not
 	NEED to generate keys because it is as if we lost the key
 	right away. fine to read some randomness and hash it. to
 	generate proper keys and an ID, use:
 	  sk, pk, _ := testutil.RandKeyPair()
 	  id, _ := peer.IDFromPublicKey(pk)
 	Also added RandPeerIDFatal helper
- removed old spipe
- updated seccat
- core: cleanup initIdentity
- removed old getFromPeerList
2014-12-23 08:33:32 -08:00
Juan Batiz-Benet
2ae9b27859 moved net/swarm2 -> swarm 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
78c0802f97 connect swarm context to network 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
bc2d35fd4d Lots of fixes. DHT tests pass 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
fd3cd399e5 mock network 2014-12-16 14:47:29 -08:00
Juan Batiz-Benet
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
Juan Batiz-Benet
061e1ab861 net: better protocol headers 2014-12-16 14:47:29 -08:00
Juan Batiz-Benet
c150668a1c net: threadsafe mux handler add 2014-12-16 14:47:29 -08:00
Brian Tiger Chow
50f01576ca Update net.go 2014-12-16 05:55:41 -08:00
Juan Batiz-Benet
6334e19374 make net work with new stream + mux 2014-12-16 05:10:46 -08:00
Juan Batiz-Benet
f15ab8eec3 net: add LocalPeer funcs 2014-12-08 20:52:45 -08:00
Juan Batiz-Benet
94f04c7fcc net: add Connectedness var. 2014-12-08 20:52:45 -08:00
Brian Tiger Chow
f25893e31a style(net) rm unused error
having an error return value makes the interface a bit confusing to
use. Just ponder... What would an error returned from a predicate
function mean?

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 15:07:33 -08:00
Jeromy
0abc72c062 move some variables into strategy 2014-12-05 20:53:21 +00:00
Juan Batiz-Benet
faab984278 net: expose GetConnections 2014-11-18 00:47:42 -08:00
Jeromy
8c20921a95 some more docs 2014-11-08 21:42:36 -08:00
Brian Tiger Chow
390f4d7419 readability(util) Do -> ContextDo
@jbenet
2014-11-05 10:07:16 -08:00
Brian Tiger Chow
68618f3fb8 fix(net) use Do to respect the caller's context 2014-11-05 10:04:20 -08:00
Brian Tiger Chow
23096de3c4 fix(net) pass contexts to dial peer 2014-11-05 10:04:20 -08:00
Juan Batiz-Benet
0135e3ebbe swarm + net: add explicit listen addresses 2014-11-05 04:00:49 -08:00
Juan Batiz-Benet
90b989a718 AddCloserChild + net ctxcloser 2014-10-25 21:33:10 -07:00
Juan Batiz-Benet
93497c2d00 muxer now uses ctxCloser 2014-10-25 21:33:10 -07:00
Juan Batiz-Benet
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
Jeromy
a8330f1f62 add methods on net interface to retrieve bandwidth values 2014-10-18 04:28:25 -07:00
Jeromy
a7b69500b1 address concerns in PR and make log stuff more fun 2014-10-10 13:18:20 -07:00
Jeromy
280c7e7e06 implement diagnostics service 2014-10-10 13:18:19 -07:00
Juan Batiz-Benet
53f0b117f5 update net with peerstore 2014-09-26 02:41:46 -07:00
Juan Batiz-Benet
9dd39de491 Fixed connections all over. 2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
313f3c83c8 muxer construction 2014-09-22 04:05:23 -07:00
Brian Tiger Chow
68216245c6 fix(net) use NetMessage interface 2014-09-22 04:05:15 -07:00
Juan Batiz-Benet
67e76c0acc godeps multiaddr + swarm move. 2014-09-22 04:05:12 -07:00
Juan Batiz-Benet
2b03664ae4 net interface 2014-09-22 04:05:12 -07:00