func (c *ConnectionManager) LookupConnection(i ConnectionID) rpc.Transporter {
	retCh := make(chan rpc.Transporter)
	c.lookupConnectionCh <- &lookupConnectionObj{i, retCh}
	return <-retCh
}
LookupConnection looks up a connection given a connectionID, or returns nil
if no such connection was found.
package libkb
import (
	"fmt"
	"sort"
	keybase1 "github.com/keybase/client/go/protocol"
	rpc "github.com/keybase/go-framed-msgpack-rpc"
)
type ConnectionID int
type addConnectionObj struct {
	xp rpc.Transporter
	ch chan<- ConnectionID
}
type lookupConnectionObj struct {
	id ConnectionID
	ch chan<- rpc.Transporter
}
type labelConnectionObj struct {
	id      ConnectionID
	details keybase1.ClientDetails
	ch      chan<- error
}
type ApplyFn func(i ConnectionID, xp rpc.Transporter) bool
type rpcConnection struct {
	transporter rpc.Transporter
	details     *keybase1.ClientDetails
}
type ConnectionManager struct {
	nxt    ConnectionID
	lookup map[ConnectionID](*rpcConnection)
	addConnectionCh    chan *addConnectionObj
	lookupConnectionCh chan *lookupConnectionObj
	removeConnectionCh chan ConnectionID
	applyAllCh         chan ApplyFn
	shutdownCh         chan struct{}
	labelConnectionCh  chan labelConnectionObj
	listAllCh          chan chan<- []keybase1.ClientDetails
}
func (c *ConnectionManager) AddConnection(xp rpc.Transporter, closeListener chan error) ConnectionID {
	retCh := make(chan ConnectionID)
	c.addConnectionCh <- &addConnectionObj{xp, retCh}
	id := <-retCh
	if closeListener != nil {
		go func() {
			<-closeListener
			c.removeConnectionCh <- id
		}()
	}
	return id
}