diff options
author | obscuren <geffobscura@gmail.com> | 2014-01-13 00:19:14 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-01-13 00:19:14 +0800 |
commit | f78bd4d5d0a6198c2c0e709440d9aa370e840617 (patch) | |
tree | cf12715f3ee3017810c2ec17fd035ce9f47097ab /peer.go | |
parent | e280a2a7e3d51f0fb3b35e580332d9b51a7e50c1 (diff) | |
download | dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.gz dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.bz2 dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.lz dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.xz dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.zst dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.zip |
Format
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1,8 +1,8 @@ package main import ( - "github.com/ethereum/ethwire-go" "github.com/ethereum/ethutil-go" + "github.com/ethereum/ethwire-go" "log" "net" ) @@ -24,15 +24,15 @@ func NewPeer(conn net.Conn, server *Server, inbound bool) *Peer { return &Peer{ outputQueue: make(chan *ethwire.InOutMsg, 1), // Buffered chan of 1 is enough quit: make(chan bool), - server: server, - conn: conn, - inbound: inbound, + server: server, + conn: conn, + inbound: inbound, } } // Outputs any RLP encoded data to the peer func (p *Peer) QueueMessage(msg *ethwire.InOutMsg) { - p.outputQueue <- msg//ethwire.InOutMsg{MsgType: msgType, Nonce: ethutil.RandomUint64(), Data: data} + p.outputQueue <- msg //ethwire.InOutMsg{MsgType: msgType, Nonce: ethutil.RandomUint64(), Data: data} } // Outbound message handler. Outbound messages are handled here @@ -145,4 +145,3 @@ func (p *Peer) handleVersionAck(msg *ethwire.InOutMsg) { } } } - |