refactor: move definition of Peer and related types

This commit is contained in:
Matthias Radestock committed 2014-12-25 14:02:53 +00:00
1 parent 7a026f5a14
commit f304543ddf
2 files changed
+22 -21

No files matched your search

-21
View File
@@ -25,27 +25,6 @@ type Router struct {
LogFrame func(string, []byte, *layers.Ethernet)
}
type Peer struct {
sync.RWMutex
Name PeerName
NameByte []byte
UID uint64
version uint64
localRefCount uint64
connections map[PeerName]Connection
}
type LocalPeer struct {
*Peer
Router *Router
queryChan chan<- *PeerInteraction
}
type PeerInteraction struct {
Interaction
payload interface{}
}
type Connection interface {
Local() *Peer
Remote() *Peer