I am able to send a udp packet to a server I made in golang using “localhost” as the host address. I can’t figure out how I am supposed to replace “localhost” with my ipv6 address. There isn’t a valid way that I have found for haxe to accept something like this “2001:0db8:85a3:0000:0000:8a2e:0370:7334” as an address. I tried figuring out my public ipv4 address but I don’t actually receive anything via my program or through a packet sending program I downloaded for debugging. The ipv6 address works in the packet sending program and my server can receive the udp packets fine. If anyone can point me in the right direction here I would really appreciate it.
I am using the following versions
flixel(4.4.2)
hscript(2.2.0)
lime(6.4.0)
openfl(8.3.0)
haxe(3.4.7)
If I understand correctly you are sending a udp packet from the server to your computer?
That’s going to be difficult in ipv4 since very very likely that’s the address of your router not your computer.
I assume ipv6 would work for that.
How are you sending the packet, and which version of hxcpp do you have?
There was some commits some time ago in hxcpp about ipv6 support.
Not really a solution for your problem if udp is required, but with tcp you could open a connection to the server and the connection would take care of getting the response back to your computer.
You can check the hxcpp version using haxelib, haxelib list hxcpp.
I checked and (at least in recent haxe) Host on cpp can take an ipv6 address, but you can’t use the int ip field,
so since UdpSocket requires an int address I don’t think you can do it yet.
You might want to open an issue about that Issues · HaxeFoundation/haxe · GitHub.
Is that for a game, what kind is it? Often tcp speed would be enough and you need the reliability, though if it’s for something like a fast pace shooter tcp is not going to cut it yeah.
Yeah it’s for a fast paced game. I was leaning towards tcp, but it isn’t fast enough for reliable movement/combat over the network. I guess I will open an issue for this, I wanted to check here first and make sure I wasn’t missing something obvious. Thanks for your help!