// To try this sample out using haXe and neko, // save this file as Application.hx and run the following to compile it: // haxe Application -neko Application.n -main Application.hx // and the following to execute it: // neko Application.n class Application { public static function main():Void { var URL = "http://localhost:8000/haxe_sample.yaws"; var cnx = haxe.remoting.HttpAsyncConnection.urlConnect(URL); cnx.setErrorHandler( function(err) { trace("Exception : " + Std.string(err)); } ); var a = {a:"foo", b:"bar", c:[1,2,3]}; var b = "hello, Erlang!"; cnx.echo.call([a, b], display); cnx.failure.call([a, b], display); } static function display(v) { trace(v); } }