mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
mostly finish migration of IP stuff to core, tuntap is still responsible for ICMP PacketTooBig
This commit is contained in:
parent
1147ee1934
commit
816356ea65
7 changed files with 114 additions and 185 deletions
|
@ -222,3 +222,28 @@ func (c *Core) RemovePeer(addr string, sintf string) error {
|
|||
func (c *Core) CallPeer(u *url.URL, sintf string) error {
|
||||
return c.links.call(u, sintf)
|
||||
}
|
||||
|
||||
func (c *Core) PublicKey() ed25519.PublicKey {
|
||||
return c.public
|
||||
}
|
||||
|
||||
func (c *Core) MaxMTU() uint64 {
|
||||
return c.store.maxSessionMTU()
|
||||
}
|
||||
|
||||
// Implement io.ReadWriteCloser
|
||||
|
||||
func (c *Core) Read(p []byte) (n int, err error) {
|
||||
n, err = c.store.readPC(p)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Core) Write(p []byte) (n int, err error) {
|
||||
n, err = c.store.writePC(p)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Core) Close() error {
|
||||
c.Stop()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue