# Sending data to UDP server throws error: haxe.io.Eof

**URL:** https://community.haxe.org/t/sending-data-to-udp-server-throws-error-haxe-io-eof/4659
**Category:** Haxe
**Created:** [August 25, 2025, 6:56am UTC](https://community.haxe.org/t/sending-data-to-udp-server-throws-error-haxe-io-eof/4659 "2025-08-25T06:56:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Zamolxis](https://avatars.discourse-cdn.com/v2/letter/z/6f9a4e/32.png) [@Zamolxis](https://community.haxe.org/u/Zamolxis)
#### Post date: [August 25, 2025, 6:56am UTC](https://community.haxe.org/t/sending-data-to-udp-server-throws-error-haxe-io-eof/4659/1 "2025-08-25T06:56:03Z")

</div>

Hi and thank you for listening.

I’ve developed a multiplayer game with Haxe and Golang using UDP. So far I’ve been starting my server locally and everything works well. Now I’ve reached the time to test my game online with my friends.

I’ve comissioned a simple Linode server and gotten the server to run. Netstat command shows the server is listening on proper port. No Iptables. No firewall.

On the client side, I changed the localhost ip into the public IP of the server. However, I am getting this error on the call to socket.sendTo():

haxe.io.Eof()

Could I be doing anything wrong on the Haxe side, or is this just a networking issue.

Cheers!

---

<div class="post-metadata">

### Author: ![PXshadow](https://community.haxe.org/user_avatar/community.haxe.org/pxshadow/32/907_2.png) [@PXshadow](https://community.haxe.org/u/PXshadow)
#### Post date: [September 12, 2025, 1:53pm UTC](https://community.haxe.org/t/sending-data-to-udp-server-throws-error-haxe-io-eof/4659/2 "2025-09-12T13:53:41Z")

</div>

Could you try sending data using Golang to the server and see if it works? I have never used the `sys.net.UdpSocket` it wouldn’t surprise me if it didn’t work properly on certain targets. What Haxe target are you using for the client side?

---

<div class="post-metadata">

### Author: ![Zamolxis](https://avatars.discourse-cdn.com/v2/letter/z/6f9a4e/32.png) [@Zamolxis](https://community.haxe.org/u/Zamolxis)
#### Post date: [October 29, 2025, 7:09pm UTC](https://community.haxe.org/t/sending-data-to-udp-server-throws-error-haxe-io-eof/4659/3 "2025-10-29T19:09:50Z")

</div>

Thank you for your reply. Sorry it took me so long to respond, but I wanted to try more thing before I did.

The first thing I did was write a relay server in Go that ran on localhost and bridged the gap. That worked 100% of the time but it was not going to cut it loing term.

Later, I switched from hl target to windows native with hlc + cl. It worked just fine for me and most playtesters, but one of them still has the error. However, the error goes away if he connects to any VPN server.

This is turning into an interesing issue indeed.

---

<div class="post-metadata">

### Author: ![PXshadow](https://community.haxe.org/user_avatar/community.haxe.org/pxshadow/32/907_2.png) [@PXshadow](https://community.haxe.org/u/PXshadow)
#### Post date: [October 30, 2025, 11:57am UTC](https://community.haxe.org/t/sending-data-to-udp-server-throws-error-haxe-io-eof/4659/4 "2025-10-30T11:57:48Z")

</div>

It sounds like it might be related to DNS lookup assuming the public ip, is a hostname if not, I’m not really sure. Would the region where he lives be significant to impede a connection? Regardless I’m glad it’s mostly working!
