outgoing -> outbound, incoming -> inbound

This commit is contained in:
Jae Kwon
2014-07-14 14:06:12 -07:00
parent 56a92b512f
commit 0ced862290
4 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -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)
}
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)