From 0ced86229054cdd6e532c3ca0236cc5639789274 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Mon, 14 Jul 2014 14:06:12 -0700 Subject: [PATCH] outgoing -> outbound, incoming -> inbound --- main.go | 8 ++++---- p2p/peer.go | 2 +- p2p/switch.go | 2 +- p2p/switch_test.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index e64027466..7323a8667 100644 --- a/main.go +++ b/main.go @@ -63,7 +63,7 @@ func (n *Node) Start() { n.pmgr.Start() } -// Add a Listener to accept incoming peer connections. +// Add a Listener to accept inbound peer connections. func (n *Node) AddListener(l p2p.Listener) { n.lz = append(n.lz, l) } @@ -74,10 +74,10 @@ func (n *Node) inboundConnectionHandler(l p2p.Listener) { if !ok { break } - // New incoming connection! + // New inbound connection! peer, err := n.sw.AddPeerWithConnection(inConn, false) if err != nil { - log.Infof("Ignoring error from incoming connection: %v\n%v", + log.Infof("Ignoring error from inbound connection: %v\n%v", peer, err) continue } @@ -110,7 +110,7 @@ func (n *Node) newPeersHandler() { if !ok { break } - // New outgoing peer! + // New outbound peer! n.SendOurExternalAddrs(peer) } } diff --git a/p2p/peer.go b/p2p/peer.go index 36e7f0c4b..be76c3170 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -260,7 +260,7 @@ func ReadPacketSafe(r io.Reader) (pkt Packet, err error) { } /* -InboundPacket extends Packet with fields relevant to incoming packets. +InboundPacket extends Packet with fields relevant to inbound packets. */ type InboundPacket struct { Peer *Peer diff --git a/p2p/switch.go b/p2p/switch.go index b55119d42..b5fc2fdd6 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -17,7 +17,7 @@ You can find all connected and active peers by iterating over ".Peers().List()". ".Broadcast()" is provided for convenience, but by iterating over the peers manually the caller can decide which subset receives a message. -Incoming messages are received by calling ".Receive()". +Inbound messages are received by calling ".Receive()". */ type Switch struct { channels []ChannelDescriptor diff --git a/p2p/switch_test.go b/p2p/switch_test.go index 963f4b97b..e1e5ac09f 100644 --- a/p2p/switch_test.go +++ b/p2p/switch_test.go @@ -36,7 +36,7 @@ func makeSwitchPair(t testing.TB, bufferSize int, chNames []string) (*Switch, *S } connIn, ok := <-l.Connections() if !ok { - t.Fatalf("Could not get incoming connection from listener") + t.Fatalf("Could not get inbound connection from listener") } s1.AddPeerWithConnection(connIn, false)