how could i use http connection instead of socket connection

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

superDin
Posts: 2
Joined: 10 Sep 2009, 12:06

how could i use http connection instead of socket connection

Postby superDin » 12 Apr 2011, 11:16

how could i use http connection instead of socket connection?
Democre
Posts: 77
Joined: 16 Sep 2010, 17:58

Postby Democre » 12 Apr 2011, 15:26

The protocol for communication between client and server is not http, so a client will not communicate with the server using http and the SFS client libraries.

You can have servlets (using embedded Jetty) talk to the SFS. In this case you could set up a http based client to talk to SFS. I believe there is very limited use case for this though. These http clients would not be first class citizens of the SFS environment, and much more work would need to be done to manage even simple things like room list update. The use cases I can think of are mostly dealing with external systems requiring a servlet callback (authentication or payment services spring to mind).

Also the SFS protocols are optimized for large volume messaging. Http simply isn't.

If however you just wanted to use the http port, you could switch it in the configs. The only problem is that you would be offering a non http service on a port that is advertised to support http, and the embedded webserver would consequently be on a nonstandard port.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: how could i use http connection instead of socket connec

Postby Bax » 12 Apr 2011, 22:28

superDin wrote:how could i use http connection instead of socket connection?

Are you maybe referring to http tunneling?
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 62 guests