Browse Source

outgoing -> outbound, incoming -> inbound

pull/9/head
Jae Kwon 11 years ago
parent
commit
0ced862290
4 changed files with 7 additions and 7 deletions
  1. +4
    -4
      main.go
  2. +1
    -1
      p2p/peer.go
  3. +1
    -1
      p2p/switch.go
  4. +1
    -1
      p2p/switch_test.go

+ 4
- 4
main.go 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
p2p/peer.go 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
p2p/switch.go 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
p2p/switch_test.go 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)


Loading…
Cancel
Save