mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Update tuntap module, return pointers
This commit is contained in:
parent
c107f891d2
commit
63936c11b5
3 changed files with 5 additions and 4 deletions
|
@ -353,13 +353,13 @@ func (c *Conn) Close() (err error) {
|
|||
// LocalAddr returns the complete node ID of the local side of the connection.
|
||||
// This is always going to return your own node's node ID.
|
||||
func (c *Conn) LocalAddr() net.Addr {
|
||||
return c.core.boxPub
|
||||
return &c.core.boxPub
|
||||
}
|
||||
|
||||
// RemoteAddr returns the complete node ID of the remote side of the connection.
|
||||
func (c *Conn) RemoteAddr() net.Addr {
|
||||
if c.session != nil {
|
||||
return c.session.theirPermPub
|
||||
return &c.session.theirPermPub
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -41,5 +41,5 @@ func (l *Listener) Close() (err error) {
|
|||
|
||||
// Addr returns the address of the listener
|
||||
func (l *Listener) Addr() net.Addr {
|
||||
return l.core.boxPub
|
||||
return &l.core.boxPub
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue