Commit Graph

15 Commits

Author SHA1 Message Date
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
6334e19374 make net work with new stream + mux 2014-12-16 05:10:46 -08:00
Juan Batiz-Benet
a3a48ce67b conn: tests pass :) 2014-12-16 05:10:45 -08:00
Juan Batiz-Benet
393842e245 much simpler net
- removed ctxcloser
- removed multiconn
- focused on netio
2014-12-16 05:10:45 -08:00
Juan Batiz-Benet
9b7fb704ef make net/conn.Conn conform to net.Conn 2014-12-16 05:10:45 -08:00
Juan Batiz-Benet
5341379f9d net/conn: io, not channels
This commit changes the connections to use io.ReadWriters
instead of channels (+ async workers). This is a pretty
big change -- away from csp -- in the name of performance
(and predictable flow control).

It also uses the brand new secio, which is spipe's successor.
2014-12-16 05:10:44 -08:00
Jeromy
b0f4b7c89d some net docs 2014-11-08 21:42:36 -08:00
Jeromy
d92db12460 lots of logging 2014-10-26 00:45:40 +00: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
Juan Batiz-Benet
3d2ba37445 moved ctxcloser to own pkg 2014-10-19 06:38:13 -07:00
Juan Batiz-Benet
68b85c992b broke out dial + listen 2014-10-19 03:33:56 -07:00
Juan Batiz-Benet
0078264a5b added to net/conn interface 2014-10-18 20:01:27 -07:00
Juan Batiz-Benet
ffba031469 test closing/cancellation
- does end properly
- no goroutines leaked!
2014-10-18 04:36:20 -07:00
Juan Batiz-Benet
7a7bf8d839 conn: raw []byte, not msg
This commit actually removes the previously introduced
chan net.NetMessage, in favor of raw []byte. It plays
nicer with crypto/spipe, and it makes more sense in the
context of a "single connection", i.e. I already know the
peer I'm talking to, from the connection. The NetMessage
additional Peer is useful swarm and up.
2014-10-18 04:36:20 -07:00
Juan Batiz-Benet
5681e27304 reworked Conn 2014-10-18 04:28:26 -07:00