What i'd like to do is make a udp program in haxe that can run on the command line. I'm trying to use hxudp to handle my udp communication (
https://github.com/andyli/hxudp). I've gotten hxudp compiling with lime & flixel no problem in a client app, but i'd like to reuse this library (and my own netcode built on top of hxudp) to make a matchmaking/NAT-punchthrough server that purely runs on the command line.
So far i'm having some problems getting this working, and I'm hoping it's just my lack of expertise with the haxe compiler :)
Not really sure where to start asking questions, so here's a list -
1. is this even possible (lol)? most of what i've seen with haxe involves using lime to compile to make visual games.
2. i think it is indeed possible based on the hello world example in the haxe documentation (
http://haxe.org/manual/introduction-hello-world.html). i see in that example it invokes the haxe compiler with the --interp flag. is that flag actually necessary for my server program to run on the command line? it looks like not using that flag omits my trace statements and sometimes produces different errors (see #3)...not really sure what's going on underneath the hood there.
3. right now i'm trying to invoke the haxe compiler kinda like this -
haxe -main Main --interp -cp source/
UdpSocket.hx:62: characters 29-67 : You cannot use the library 'hxudp' inside a macro
what does that macro error even mean?
I tried removing the --interp flag and i get a bunch of errors about not finding Lib
UdpSocket.hx:62: characters 29-37 : Unknown identifier : Lib
UdpSocket.hx:74: characters 32-40 : Unknown identifier : Lib
UdpSocket.hx:80: characters 33-41 : Unknown identifier : Lib
..etc
4. is this all just some fundamental misunderstanding and i can actually use lime for this? it seemed like no matter what i did, compiling with lime always wanted to open up a window for visuals
It'd be pretty sweet to get this working! Thanks for taking a look :)