The code below using at send a ExtensionRequest within AS3 client to the server:
Code: Select all
public function requestData(param1:String, param2:Object, param3:Function, param4:Room = null) : void
{
if(dataList[param1] == null)
{
dataList[param1] = [];
}
if(param3)
{
dataList[param1].push(param3);
}
var _loc5_:ServiceParameters = new ServiceParameters();
_loc5_.sn = param1;
_loc5_.data = JSON.stringify(param2 == null?{}:param2);
_sfs.send(new ExtensionRequest(param1,_loc5_.getSFSObject(),param4));
}
And this one is the response listener function:
Code: Select all
var _loc3_:* = null;
var _loc5_:* = null;
var _loc6_:int = 0;
var _loc7_:String = param1.params.cmd;
var _loc4_:ISFSObject = param1.params.params;
var _loc2_:String = checkResponse(_loc7_,_loc4_);
if(_loc2_ == null)
{
return;
}
Well, how can I send / receive requests like this using C# API?
Thx in advance!