Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (21 sloc) 0.721 kb
// 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);
}
}
Jump to Line
Something went wrong with that request. Please try again.