func (p *Peer) getConn(i int) *Connection {
	inboundLen := len(p.inboundConnections)
	if i < inboundLen {
		return p.inboundConnections[i]
	}

	return p.outboundConnections[i-inboundLen]
}
func (p *Peer) getConn(i int) *Connection {
	inboundLen := len(p.inboundConnections)
	if i < inboundLen {
		return p.inboundConnections[i]
	}

	return p.outboundConnections[i-inboundLen]
}
func ( p * Peer ) getConn ( i int ) * Connection { inboundLen := len ( p . inboundConnections ) if i < inboundLen { return p . inboundConnections [ i ] } return p . outboundConnections [ i - inboundLen ] }
// getConn treats inbound and outbound connections as a single virtual list
// that can be indexed. The peer must be read-locked.
getConn treats inbound and outbound connections as a single virtual list that can be indexed . The peer must be read - locked .