diff options
author | Felix Lange <fjl@twurst.com> | 2015-05-14 23:41:43 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-05-25 07:17:14 +0800 |
commit | dbdc5fd4b33ad98ebde72e7d934cebab1408f057 (patch) | |
tree | 79d6b8827555b0220a89456d3132f40ed0f9b291 /p2p/peer.go | |
parent | 2f249fea448a10ae0986a140f5a52d8a310e57fe (diff) | |
download | go-tangerine-dbdc5fd4b33ad98ebde72e7d934cebab1408f057.tar.gz go-tangerine-dbdc5fd4b33ad98ebde72e7d934cebab1408f057.tar.zst go-tangerine-dbdc5fd4b33ad98ebde72e7d934cebab1408f057.zip |
p2p: delete Server.Broadcast
Diffstat (limited to 'p2p/peer.go')
-rw-r--r-- | p2p/peer.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/p2p/peer.go b/p2p/peer.go index c7ec08887..562fbc1b4 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -273,20 +273,6 @@ func (p *Peer) getProto(code uint64) (*protoRW, error) { return nil, newPeerError(errInvalidMsgCode, "%d", code) } -// writeProtoMsg sends the given message on behalf of the given named protocol. -// this exists because of Server.Broadcast. -func (p *Peer) writeProtoMsg(protoName string, msg Msg) error { - proto, ok := p.running[protoName] - if !ok { - return fmt.Errorf("protocol %s not handled by peer", protoName) - } - if msg.Code >= proto.Length { - return newPeerError(errInvalidMsgCode, "code %x is out of range for protocol %q", msg.Code, protoName) - } - msg.Code += proto.offset - return p.rw.WriteMsg(msg) -} - type protoRW struct { Protocol in chan Msg |