Conn `Addr` methods return udp
Closed this issue · 3 comments
whyrusleeping commented
I'm not sure if this is actually an issue, but the LocalAddr
and RemoteAddr
methods on a Conn return an address whose network identifies as udp. I think these should return utp{4,6} instead, as its more accurate.
I currently wrap the utp conn from your package to change this functionality, but if you could add it upstream that would be very helpful.
anacrolix commented
Will fix.
anacrolix commented
Do you need to be able to identify the type of net.Addr that's returned from these methods?
anacrolix commented
The net.Addr returned by LocalAddr and RemoteAddr, both have .Network() of type "utp/"+underlying PacketConn network. The String/Addr part is passthrough, which matches the way uTP operates.