influxdata / influxdb-client-php

InfluxDB (v2+) Client Library for PHP
https://influxdata.github.io/influxdb-client-php/
MIT License
150 stars 47 forks source link

UdpWriter does not support IPv6 #91

Closed kevin0x90 closed 3 years ago

kevin0x90 commented 3 years ago

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.

bednar commented 3 years ago

Hi @kevin0x90,

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

Regards

kevin0x90 commented 3 years ago

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?

kevin0x90 commented 3 years ago

@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.

bednar commented 3 years ago

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