WIP: replace the backend address related fields/API from udp config, move them to backend udp
This commit is contained in:
@@ -125,10 +125,9 @@ func sendUDP(ctx context.Context) {
|
||||
if laddr, err = net.ResolveUDPAddr(UDP, ""); err != nil {
|
||||
log.Fatal().Caller().Err(err).Str(SERVER, viper.GetString(SERVER)).Msg("udp resolve local/self address")
|
||||
}
|
||||
//TODO: log address to be bound by client
|
||||
log.Info().Str(SERVER, viper.GetString(SERVER)).Msgf("bound address %v", laddr)
|
||||
|
||||
//TODO: use un-connected socket of UDP, replace all net.DialUDP() with net.ListenUDP()
|
||||
// In Go, binding for UDP using ListenUDP. Confusing!!
|
||||
// In Go, binding address and port for UDP use ListenUDP. Confusing!!
|
||||
if conn, err = net.ListenUDP(UDP, laddr); err != nil {
|
||||
log.Fatal().Caller().Err(err).Str(SERVER, viper.GetString(SERVER)).Msg("fail to bind local/self address")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user