mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
(broken state) more WIP (cleanup)
This commit is contained in:
parent
0f787364de
commit
b345806e3f
2 changed files with 6 additions and 227 deletions
|
@ -41,8 +41,6 @@ type TunAdapter struct {
|
|||
core *yggdrasil.Core
|
||||
secret ed25519.PrivateKey
|
||||
store keyStore
|
||||
writer tunWriter
|
||||
reader tunReader
|
||||
config *config.NodeState
|
||||
log *log.Logger
|
||||
reconfigure chan chan error
|
||||
|
@ -122,8 +120,6 @@ func (tun *TunAdapter) Init(secret ed25519.PrivateKey, core *yggdrasil.Core, con
|
|||
tun.store.init(tun)
|
||||
tun.config = config
|
||||
tun.log = log
|
||||
tun.writer.tun = tun
|
||||
tun.reader.tun = tun
|
||||
tun.core.SetOutOfBandHandler(tun.oobHandler)
|
||||
|
||||
return nil
|
||||
|
@ -170,11 +166,9 @@ func (tun *TunAdapter) _start() error {
|
|||
}
|
||||
// TODO tun.core.SetMaximumSessionMTU(tun.MTU())
|
||||
tun.isOpen = true
|
||||
// TODO go tun.handler()
|
||||
tun.reader.Act(nil, tun.reader._read) // Start the reader
|
||||
tun.ckr.init(tun)
|
||||
go tun.doRead()
|
||||
go tun.doWrite()
|
||||
go tun.read()
|
||||
go tun.write()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue