Commit Graph

13 Commits

Author SHA1 Message Date
Felix Lange 4bef3ce284 p2p: print Cap as name/version 2015-02-13 23:54:34 +01:00
Felix Lange 5bdc115943 p2p: integrate p2p/discover
Overview of changes:

- ClientIdentity has been removed, use discover.NodeID
- Server now requires a private key to be set (instead of public key)
- Server performs the encryption handshake before launching Peer
- Dial logic takes peers from discover table
- Encryption handshake code has been cleaned up a bit
- baseProtocol is gone because we don't exchange peers anymore
- Some parts of baseProtocol have moved into Peer instead
2015-02-06 00:00:36 +01:00
zelig d227f6184e fix protocol to accomodate privkey 2015-02-06 00:00:34 +01:00
Felix Lange b0ff946b55 p2p: move peerList back into baseProtocol
It had been moved to Peer, probably for debugging.
2015-01-06 12:23:38 +01:00
Felix Lange eb0e7b1b81 eth, p2p: remove EncodeMsg from p2p.MsgWriter
...and make it a top-level function instead.

The original idea behind having EncodeMsg in the interface was that
implementations might be able to encode RLP data to their underlying
writer directly instead of buffering the encoded data. The encoder
will buffer anyway, so that doesn't matter anymore.

Given the recent problems with EncodeMsg (copy-pasted implementation
bug) I'd rather implement once, correctly.
2015-01-06 12:23:38 +01:00
obscuren 6abf8ef78f Merge 2015-01-05 17:10:42 +01:00
Felix Lange f0f6727778 p2p: use an error type for disconnect requests
Test-tastic.
2014-12-15 00:28:20 +01:00
Felix Lange 9423401d73 p2p: fix decoding of disconnect reason (fixes #200) 2014-12-12 11:40:02 +01:00
Felix Lange 6049fcd52a p2p: use package rlp for baseProtocol 2014-11-25 12:25:31 +01:00
Felix Lange 59b63caf5e p2p: API cleanup and PoC 7 compatibility
Whoa, one more big commit. I didn't manage to untangle the
changes while working towards compatibility.
2014-11-21 21:52:45 +01:00
Felix Lange 7149191dd9 p2p: fix issues found during review 2014-11-21 21:52:45 +01:00
Felix Lange f38052c499 p2p: rework protocol API 2014-11-21 21:52:45 +01:00
zelig 771fbcc02e initial commit of p2p package 2014-10-23 16:57:54 +01:00