Channel bytes are spelled fully, "XXXChannel"

This commit is contained in:
Jae Kwon
2015-03-24 12:00:27 -07:00
parent 9703d34b65
commit 0237d284cc
10 changed files with 70 additions and 43 deletions

View File

@ -55,6 +55,12 @@ func (ps *PeerSet) Has(peerKey string) bool {
return ok
}
func (ps *PeerSet) Get(peerKey string) *Peer {
ps.mtx.Lock()
defer ps.mtx.Unlock()
return ps.lookup[peerKey].peer
}
func (ps *PeerSet) Remove(peer *Peer) {
ps.mtx.Lock()
defer ps.mtx.Unlock()