HolePuncher icon indicating copy to clipboard operation
HolePuncher copied to clipboard

Make it work with Godot 4.2.2

Open sirikon opened this issue 9 months ago • 0 comments

Hi there! We've been adapting the script to make it work properly on Godot 4.2.2. Here are the changes we had to introduce to make it work for us.

  • Fixed the SERVER_INFO packet parsing (it was just picking the port and ignoring address and peer name).
  • Changed remaining calls from listen (not present anymore in Godot 4.2.2) to bind.
  • Closed sockets before signaling hole_punched, so if a new socket starts immediately afterwards, there won't be any problems with the port being in use.
  • Made sure that both server_udp and peer_udp are closed before emitting hole_punched.

Hope this is useful!

sirikon avatar May 16 '24 18:05 sirikon