Begin implementation of outbound work queue
This commit is contained in:
parent
9d806d3853
commit
eb75ff430d
6 changed files with 181 additions and 84 deletions
|
|
@ -14,8 +14,7 @@ const (
|
|||
|
||||
type Peer struct {
|
||||
mutex sync.RWMutex
|
||||
endpointIP net.IP //
|
||||
endpointPort uint16 //
|
||||
endpoint *net.UDPAddr
|
||||
persistentKeepaliveInterval time.Duration // 0 = disabled
|
||||
keyPairs KeyPairs
|
||||
handshake Handshake
|
||||
|
|
@ -35,6 +34,7 @@ func (device *Device) NewPeer(pk NoisePublicKey) *Peer {
|
|||
|
||||
peer.mutex.Lock()
|
||||
peer.device = device
|
||||
peer.keyPairs.Init()
|
||||
peer.queueOutbound = make(chan *OutboundWorkQueueElement, OutboundQueueSize)
|
||||
|
||||
// map public key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue