Haxe Client and Server on v0.10
Using the externs by Serjek I was able to create a very Simple Colyseus Server with a StateHandler Room that handles string data. The data is send to the clients and everything works as it supposed to.
But only for HTML5 !!!
I again have lots of problems to get it to work on anything else than HTML5.
Here are the (non-stencyl) HaxeToolkit steps that I made:
haxelib setup c:\HaxeToolkit\haxe\lib
haxelib --global update haxelib
haxelib is up to date
haxelib install openfl
haxelib run openfl setup
haxelib run lime setup
Up to Date
Get GIT from :
git clone https://github.com/colyseus/colyseus-hx.git
Edit: the ws connection so that it points to the docker server
Also Edit the this.client.join line on number 55:
//this.room = this.client.join("state_handler", , State);
this.room = this.client.join("state_handler", new Map<String,Dynamic>(), State);
Build the project:
haxelib install haxe-ws
haxelib set hxcpp 3.2.94
lime build project.xml html5
lime test html5
It works like a charm with the Serjek externs in the Colyseus Docker .
But Android and Windows give again connection problems:
haxelib set hxcpp 4.0.8
lime build windows
lime test windows
The connection is attempted but not made:
- src/lime/utils/AssetCache.cpp [haxe,release]
Creating library ApplicationMain.lib and object ApplicationMain.exp
Main.hx:48: CLIENT CLOSE
Connection.hx:66: WebSocket connection has been closed, stopping the thread!
Main.hx:29: ERROR! timeout
(I've tried the alterations on the haxe-ws library that I made for the 0.9 but they didn't solved it now)
I am very curious if anyone got a different target to run with haxe other than HTML5 ??!??