influxdata/influxdb-client-php

UdpWriter does not support IPv6

kevin0x90 opened this issue · 4 comments

Proposal:
I would like to be able to use the UdpWriter not only with IPv4 but also with IPv6.

Current behavior:
Currently only IPv4 is supported due to the nature of socket_create

Desired behavior:
I would like to have a way to configure the client to use either IPv4 (maybe default) or IPv6.

Alternatives considered:
Alternative could be some kind of auto detection if IPv6 is available but i think this might be a bit too much.

Use case:
I want to use the UdpWriter in an infrastructure environment where IPv6 is used.

Hi @kevin0x90,

thanks for the suggestion 👍. Is this something you might be willing to help with?

Regards

Hi @bednar ,

i would like to help with this but currently I’m not sure when I find the time for it, maybe in the next few days. My approach in the first place would be to provide an additional option in the options map when building the client. How is your opinion regarding this?

@bednar i created a draft PR but to be honest i have no idea at the moment how i could test the correct parameters for the builtin socket functions.

@kevin0x90 I think there is not easy way how to test this feature, let's leave it without test. World isn't perfect ;)