-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net.PacketConn #367
Comments
@Sean-Der Do you know why this is? Looking at our code, the only thing we use from Conn that PacketConn doesn't have is the RemoteAddr, but since using ReadFrom on a PacketConn returns the info it doesn't seem necessary. Somewhat similarly we'd need to use WriteTo on a PacketConn, which in turn needs the address. But it feels like this is something we should just plop onto the ConnCtx. I'm honestly a little confused myself now 😅 |
The other day I was listening to Adam Woodbeck, author of Network Programming with Go, during a gotime podcast (https://changelog.com/gotime/176) and he recommends to use |
Just a design mistake! I am up for fixing this in the next major release. Maybe we could provide a nice helper to make This also would be a great chance to fix this as well. We shouldn't provide a |
Assigned myself as this is being addressed as part of #558. |
I'm a little surprised to find that a DTLS implementation, which is specifically datagram-oriented, seems to expect a stream-oriented
net.Conn
rather than a datagram-orientednet.PacketConn
as an input toClient()
andServer()
.Curious if there is a reason for this? It means that anything
net.PacketConn
-based has to be wrapped.The text was updated successfully, but these errors were encountered: