_sendRequest doesn't work

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

fotios
Posts: 4
Joined: 05 Oct 2009, 09:39

_sendRequest doesn't work

Postby fotios » 25 Nov 2009, 01:56

Hi there,

I wrote an extension and used the _server.sendResponse in the following function: handleRequest(cmd, params, user, fromRoom, protocol) just like in the tutorial examples:

var res = [];
res[0] = "sr";
_server.sendResponse(res, -1, null, [user], "str");

(I tried many different array elements for res; using the string "sr" is one simple test).

I used tcpdump and charles for checking if it sends anything to the client, and I can't trace anything sent.

I went through the forums, the api docs and the code samples, but I don't know what's wrong. I don't get any errors in the SF logs either. I also tried having response with _cmd and values set, but without any results....

Could you please help me understand what is going wrong?

Thanks,
Fotios
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 25 Nov 2009, 18:26

I used tcpdump and charles for checking if it sends anything to the client, and I can't trace anything sent.

Are you sure you're properly connected?
If you run in the Flash IDE with the SmartFoxClient debug flag set to true what do you see in the Output window?
Are you sure that the code sending the request is really called by your application?

Thank you
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 45 guests