1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-11 23:46:39 +08:00

32 Commits

Author SHA1 Message Date
4807127def net: move Network implementation to own pkg
I needed the network implementation in its own
package, because I'll be writing several services that
will plug into _it_ that shouldn't be part of the core net
package. and then there were dependency conflicts. yay.
mux + identify are good examples of what i mean.
2015-01-02 08:46:43 -08:00
0013415db8 net/interface: move more to Dialer 2014-12-24 02:10:56 -08:00
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
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
358b8a9984 net: testing protocol 2014-12-17 23:25:41 -08:00
2f9d398d66 mock2/ connections 2014-12-17 23:25:39 -08:00
6884c9ddd2 trivial change to trigger build 2014-12-17 23:25:38 -08:00
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
061e1ab861 net: better protocol headers 2014-12-16 14:47:29 -08:00
c150668a1c net: threadsafe mux handler add 2014-12-16 14:47:29 -08:00
f18bbde344 net: StreamHandlerMap + protocol ids 2014-12-16 14:47:29 -08:00
6334e19374 make net work with new stream + mux 2014-12-16 05:10:46 -08:00
93872a52fc net/interface: use iota 2014-12-08 21:12:58 -08:00
f15ab8eec3 net: add LocalPeer funcs 2014-12-08 20:52:45 -08:00
ff1e672d5a dht/pb: changed PeersToPBPeers to set ConnectionType
Uses an inet.Dialer
2014-12-08 20:52:45 -08:00
94f04c7fcc net: add Connectedness var. 2014-12-08 20:52:45 -08:00
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
0abc72c062 move some variables into strategy 2014-12-05 20:53:21 +00:00
faab984278 net: expose GetConnections 2014-11-18 00:47:42 -08:00
b0f4b7c89d some net docs 2014-11-08 21:42:36 -08:00
23096de3c4 fix(net) pass contexts to dial peer 2014-11-05 10:04:20 -08:00
0135e3ebbe swarm + net: add explicit listen addresses 2014-11-05 04:00:49 -08:00
8cf22c062f core is now ctxcloser 2014-10-25 21:33:10 -07:00
cc5c181ae0 Dialer for dht
dht doesn't need the whole network interface, only needs a Dialer.
(much reduced surface of possible errors)
2014-10-22 03:24:05 -07:00
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
a8330f1f62 add methods on net interface to retrieve bandwidth values 2014-10-18 04:28:25 -07:00
338b037238 clean up and add inet.Network to bitswap
new Service interface
2014-10-10 20:43:04 -07:00
a7b69500b1 address concerns in PR and make log stuff more fun 2014-10-10 13:18:20 -07:00
865109f562 expose handler in inet 2014-09-22 04:05:16 -07:00
9849794b07 Move Sender interface to network pkg
@perfmode sender is exactly what we need to pass in to dht/bitswap.
2014-09-22 04:05:16 -07:00
68216245c6 fix(net) use NetMessage interface 2014-09-22 04:05:15 -07:00
2b03664ae4 net interface 2014-09-22 04:05:12 -07:00