thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parenteau <apare...@adobe.com>
Subject AS3 example for TFullDuplexHttpClient
Date Tue, 28 Jun 2011 08:33:08 GMT
Hi,

I'm looking for a snippet of code illustrating AS3 TFullDuplexHttpClient (0.7.0 svn).

Here is what I came up with using THttpClient instead:

var req:URLRequest = new URLRequest("http://192.168.1.95:9090/");
var trans:THttpClient = new THttpClient(req);

var prot:TBinaryProtocol = new TBinaryProtocol(trans);
var impl:ImagingImpl = new ImagingImpl(prot);
var proc:ImagingProcessor = new ImagingProcessor(impl);


var onError:Function = function(error:Error):void {
      trace(error.toString());
}

var onSuccess:Function = function(res:ByteArray):void {
      trace(res.length);
}

impl.mandelbrot(100, 100, onError, onSuccess);

Thanks,
alex


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message