You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current function documentation is rather laconic:
WriteTo implements the PacketConn WriteTo method.
Unfortunately, its use is not as obvious as it may seem because the connection must be in non-pre-connected state (otherwise you get an ErrWriteToConnected error). What does this state really mean and how to achieve it? The first thing I tried was to use UDPConn structure without DialUDP:
After looking at how everything is implemented, I understood that I need to create a connection using the net.ListenUDP() function, but this is not too intuitive.
An example code of how to use this function (in GoDoc) would significantly simplify its use, without getting deep into the implementation details.
The text was updated successfully, but these errors were encountered:
The current function documentation is rather laconic:
Unfortunately, its use is not as obvious as it may seem because the connection must be in non-pre-connected state (otherwise you get an
ErrWriteToConnected
error). What does this state really mean and how to achieve it? The first thing I tried was to useUDPConn
structure withoutDialUDP
:Unfortunately, I've got a very unclear error:
After looking at how everything is implemented, I understood that I need to create a connection using the
net.ListenUDP()
function, but this is not too intuitive.An example code of how to use this function (in GoDoc) would significantly simplify its use, without getting deep into the implementation details.
The text was updated successfully, but these errors were encountered: