[ask] smartfoxserver protocol

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

Moderators: Lapo, Bax

deux
Posts: 21
Joined: 15 Dec 2010, 07:48

[ask] smartfoxserver protocol

Postby deux » 17 Jun 2011, 11:26

hii..im newbie in smartfox..
i want to learn about smartfoxserver and developing a virtual world for my coursework..

i have one question about smartfox..
what default protocol does smartfoxserver used?

in smartfox document it said smartfox using xml for default protocol..
and in other document (http://docs2x.smartfoxserver.com/AdvancedTopics/using-udp-protocol) it said the default protocol used is TCP..
or
xml over tcp? :?
sorry for my 'newbie' english
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 17 Jun 2011, 12:14

Hi. Those are different products:

- SFS1x - that yes, uses xml protocol
- SFS2x - a much more improved server which uses TCP protocol (and can also use UDP)

For the SFS1x documentation you can check at www.smartfoxserver.com/docs

For the SFS2x documentation you can check at http://docs2x.smartfoxserver.com

Hope this helps
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 17 Jun 2011, 19:20

I think there's some confusion about the term 'protocol'. It can be used for two ways. The internet protocol and the message protocol.

SFS1x uses TCP internet protocol
SFS2x uses both TCP and UDP internet protocol

SFS1x uses XML message protocol for its core messaging. You can however send custom messages using JSON or STR protocol.

SFS2x uses binary message protocol which is a lot lighter than its predecessor. See http://docs2x.smartfoxserver.com/Overview/sfs2x-protocol
Smartfox's forum is my daily newspaper.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 17 Jun 2011, 19:54

Oh, learned one thing today :-)
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
deux
Posts: 21
Joined: 15 Dec 2010, 07:48

Postby deux » 18 Jun 2011, 02:08

thanks all for the answer :D
sorry for my 'newbie' english
tdaly
Posts: 3
Joined: 24 Mar 2014, 15:20

Re: [ask] smartfoxserver protocol

Postby tdaly » 24 Mar 2014, 16:02

Just wondering if the binary message format for SFS 2X is a SmartFox proprietary format, or developed elsewhere (e.g. Adobe)?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [ask] smartfoxserver protocol

Postby Lapo » 24 Mar 2014, 18:44

Yes, it is a custom protocol, developed in house.
Lapo
--
gotoAndPlay()
...addicted to flash games
tdaly
Posts: 3
Joined: 24 Mar 2014, 15:20

Re: [ask] smartfoxserver protocol

Postby tdaly » 25 Mar 2014, 12:30

If you were using WebSockets though, I understand JSON is used as the message format, is that right?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [ask] smartfoxserver protocol

Postby Lapo » 25 Mar 2014, 12:41

Yes.
Lapo

--

gotoAndPlay()

...addicted to flash games
tdaly
Posts: 3
Joined: 24 Mar 2014, 15:20

Re: [ask] smartfoxserver protocol

Postby tdaly » 26 Mar 2014, 12:40

If I wanted to send custom-format XML documents between client and server, would that be difficult since the websockets mode uses JSON rather than XML?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [ask] smartfoxserver protocol

Postby Lapo » 26 Mar 2014, 13:16

No, I think you should be able to send it without any problems.
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 75 guests