Node returns the last node that was sent to the node callback.
()
| 721 | |
| 722 | // Node returns the last node that was sent to the node callback. |
| 723 | func (c *Conn) Node() *Node { |
| 724 | c.nodeUpdater.L.Lock() |
| 725 | defer c.nodeUpdater.L.Unlock() |
| 726 | return c.nodeUpdater.nodeLocked() |
| 727 | } |
| 728 | |
| 729 | // This and below is taken _mostly_ verbatim from Tailscale: |
| 730 | // https://github.com/tailscale/tailscale/blob/c88bd53b1b7b2fcf7ba302f2e53dd1ce8c32dad4/tsnet/tsnet.go#L459-L494 |