Implementing a Login System

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

Moderators: Lapo, Bax

lak3y
Posts: 2
Joined: 14 Jun 2017, 04:56

Implementing a Login System

Postby lak3y » 14 Jun 2017, 06:06

Hey all,

The past few days I've been utilizing the latest version of SmartFoxServer Pro to create a small-scale virtual world in the form of a Flash application, and it has been definitely useful. However, after reading the documents and searching for numerous articles and videos for half the time, I decided to come here and ask for your support!

At the moment I am implementing a login system that is currently utilizing the random key concept by the use of Java extensions. I have sniffed the packets that were received when I tried logging in, but it does not communicate any further. A policy file request was successfully exchanged, as well as some API check I think and a successful communication of the key. However, after receiving the key, the Flash application would try to send several parameters which includes an individual's username and encrypted password, but there would be no further packets to be sent. Furthermore, I did not receive any internal or requested event other than the "serverReady" event in my Java extension, not even a "loginRequest" came out, which was supposed to, right?

This was before me installing the latest patch provided by the official SmartFoxServer website. When I actually installed the patch after reading several articles around the forum, I finally receive something in the console...
00:51:35.719 - [ WARNING ] > Unknown event type: , Disconnecting: java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:6112 remote=/0:0:0:0:0:0:0:1:51601]

But there isn't supposed to be a null or blank event type.

What is wrong? I've changed my configuration file to have a "true" custom login, and imported my Java extension which is lightweight and does nothing but trace events, which doesn't trace anything but "serverReady". I also tried creating an Actionscript 2 extension, but it provides the same error. Is there a workaround to directly edit the system packet handler (it seems like you can't) ? Is my SmartFoxServer bugged (MacOS, latest version and patch provided by the official SFS website) ? Or am I doing this all wrong?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Implementing a Login System

Postby Lapo » 14 Jun 2017, 07:27

Hi,
can you show me the client side code you're using?
Also, have you tried runnning any of the examples provided with SFS PRO? For instance there's an example login extension under the sfsExtensions/ folder (there's 2 actually).

---
Side note: if you've just started out I'd recommend checking SmartFoxServer 2X. It's a much more recent product, with many more features and supports a larger set of client technologies including all mobile platforms.
Take a look at the differences here:
http://smartfoxserver.com/products
---
Lapo
--
gotoAndPlay()
...addicted to flash games
lak3y
Posts: 2
Joined: 14 Jun 2017, 04:56

Re: Implementing a Login System

Postby lak3y » 14 Jun 2017, 19:06

Hey Lapo,

Thanks for the response. I ran the SFS Pro examples and they seemed to work perfectly. I just had a simple configuration file error where I did not create the zones correctly.

Lapo wrote:Side note: if you've just started out I'd recommend checking SmartFoxServer 2X. It's a much more recent product, with many more features and supports a larger set of client technologies including all mobile platforms.
Take a look at the differences here:
http://smartfoxserver.com/products

I took a look at the differences, but I chose SFS Pro for its simplicity by the looks of it. Is 2X any different from Pro in terms of extensions, configuration files, etc.? Would there be a seamless transition from Pro to 2X?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Implementing a Login System

Postby Lapo » 15 Jun 2017, 07:32

lak3y wrote:I took a look at the differences, but I chose SFS Pro for its simplicity by the looks of it. Is 2X any different from Pro in terms of extensions, configuration files, etc.? Would there be a seamless transition from Pro to 2X?

No, there're differences and the transition is not automatic.

Cheers
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 25 guests