quipo / statsd

Golang StatsD client
MIT License
164 stars 51 forks source link

Enforce create udp4 socket #45

Open stgleb opened 6 years ago

stgleb commented 6 years ago

Right now when I create udp socket there is no option to specify which ip version to use, I've got an issue on one of my servers statd clients sends udp packets over udp6

#
U ::1:13896 -> ::1:8125
environment.p007.p007_1.p007_1.redis.connection.active:1596|g

But statsd just drops these packets, only when I send them over ipv4

echo "sample.gauge:14|g" | nc -u -w0 127.0.0.1 8125

it is ok. Is there any way to specify ip version of client or it needs pull request?

quipo commented 6 years ago

not sure I follow... can you not specify a udp4 address in the constructor?

statsd.NewStatsdClient(udp4_address_here, ...)