sendxt not working help

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

wadapav
Posts: 14
Joined: 29 Oct 2018, 11:00

sendxt not working help

Postby wadapav » 01 Nov 2018, 16:05

I am trying to send an extension message, which does not seem to be working :( I have verified that my connection to the smartfox server does indeed work, and I have tested the extension from director using Lingo, doing _server.sendXtMessage("extname", "func", obj, "str") and this is successful. When I attempt to do the equivalent from within the .Net framework, like this:
smc.SendXtMessage("extension", "func", args, SmartFoxClient.XTMSG_TYPE_STR) where args is a Hashtable, and smc is of type SmartFoxClient, it appears that the message does not get sent. GetConnectionMode() is socket, and smc.IsConnected() is True. I am stuck, any help on this would be much appreciated, thanks.
Last edited by wadapav on 04 Nov 2018, 18:51, edited 1 time in total.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: sendxt not working help

Postby Lapo » 02 Nov 2018, 08:40

Hi,
just to understand are you working in Unity or standalone .Net?

In order to be able to send an Extension call you normally need to be connected and logged in the server.
Do you do these steps first?

Once you're logged in, if the Extension call doesn't seem to work check the server side logs for errors. It's likely there's a problem in the call and the server will give you a clue about it.

Let us know
Lapo
--
gotoAndPlay()
...addicted to flash games
DrPsyche
Posts: 8
Joined: 09 Jan 2019, 11:47

Re: sendxt not working help

Postby DrPsyche » 10 Jun 2019, 06:53

wadapav wrote:I am trying to send an extension message, which does not seem to be working :( I have verified that my connection to the smartfox server does indeed work, and I have tested the extension from director using Lingo, doing _server.sendXtMessage("extname", "func", obj, "str") and this is successful. When I attempt to use fast essay tool and do the equivalent from within the .Net framework, like this:
smc.SendXtMessage("extension", "func", args, SmartFoxClient.XTMSG_TYPE_STR) where args is a Hashtable, and smc is of type SmartFoxClient, it appears that the message does not get sent. GetConnectionMode() is socket, and smc.IsConnected() is True. I am stuck, any help on this would be much appreciated, thanks


Hello,

I had the same issue (months ago) and found the solution in one of the older threads. It won't work, if you send the login command before the connection is up running. You also need to check the success of the connection before you try to login. Thus, the call to login should be in the response from the connection.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 24 guests