mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
upgrade phony dependency and switch to its new interface
This commit is contained in:
parent
cff1366146
commit
aa30c6cc98
10 changed files with 54 additions and 54 deletions
|
@ -174,7 +174,7 @@ type switchTable struct {
|
|||
data switchData //
|
||||
updater atomic.Value // *sync.Once
|
||||
table atomic.Value // lookupTable
|
||||
phony.Actor // Owns the below
|
||||
phony.Inbox // Owns the below
|
||||
queues switch_buffers // Queues - not atomic so ONLY use through the actor
|
||||
idle map[switchPort]time.Time // idle peers - not atomic so ONLY use through the actor
|
||||
}
|
||||
|
@ -828,8 +828,8 @@ func (t *switchTable) _handleIdle(port switchPort) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (t *switchTable) packetInFrom(from phony.IActor, bytes []byte) {
|
||||
t.EnqueueFrom(from, func() {
|
||||
func (t *switchTable) packetInFrom(from phony.Actor, bytes []byte) {
|
||||
t.RecvFrom(from, func() {
|
||||
t._packetIn(bytes)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue