have the core wrap and export the underlying PacketConn, move IPv6 ReadWriteCloser wrapper logic to a separate package

This commit is contained in:
Arceliar 2021-07-05 13:14:12 -05:00
parent 35e8ff7c9d
commit f990a56046
11 changed files with 170 additions and 110 deletions

View file

@ -230,7 +230,7 @@ func (intf *link) handler() (chan struct{}, error) {
intf.links.core.log.Infof("Connected %s: %s, source %s",
strings.ToUpper(intf.info.linkType), themString, intf.info.local)
// Run the handler
err = intf.links.core.pc.HandleConn(ed25519.PublicKey(intf.info.key[:]), intf.conn)
err = intf.links.core.HandleConn(ed25519.PublicKey(intf.info.key[:]), intf.conn)
// TODO don't report an error if it's just a 'use of closed network connection'
if err != nil {
intf.links.core.log.Infof("Disconnected %s: %s, source %s; error: %s",