Sorry if this is confused, cause i'm new at this...
I have a flash app which has buddy list of SFS2X, and a social website which contains this flash app.
The website can also display buddy list somewhere in the web page using PHP/Ajax (or some other web languages)...
I'm leaving the "add buddy" feature for the website, not the flash app. So the website will have the ability for notifying "buddy request", accepting or denying a "buddy request"...
For now i don't know how to achieve this, i can't find a way to communicate with SFS2X using PHP/Ajax... Between, maybe i'm talking about webserver (this is embarrassed ..)
Please give me some helps?
Thanks!
SFS2X communicates with web?
Maybe the easier way is that you store your buddy data in a database (so you can update it from you php page), and then, in SFS2X, use a custom buddy list persister class as described at the bottom of this document.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Thanks for your reply.
The example i wrote is one of the case that i want the web to communicate with SFS2X.
Some more cases like: a website user chats with another iPhone user; a website user sends "buddy request" to iPhone user, then SFS2X will immediately inform the iPhone user about the buddy request.
I don't know if we can achieve this using Jetty and SFS2X...
So confused
The example i wrote is one of the case that i want the web to communicate with SFS2X.
Some more cases like: a website user chats with another iPhone user; a website user sends "buddy request" to iPhone user, then SFS2X will immediately inform the iPhone user about the buddy request.
I don't know if we can achieve this using Jetty and SFS2X...
So confused
dmp wrote:Can you give me any example about servlet/jsp deployed in Jetty can connect SFS2X?
Here's a simple servlet written in groovy that merely lists the zones in your smartfoxserver instance. You can do the exact same thing in java, it just takes a little more code:
Code: Select all
import com.smartfoxserver.v2.SmartFoxServer
out << SmartFoxServer.getInstance().zoneManager.zoneList
If you wanted to do something with one of your extensions, you'd make the call to
and then call methods on that extension such as handleClientRequest.Next I wrote:def ext = SmartFoxServer.getInstance().zoneManager.getZoneByName("myZoneName").extension
If you want to call extension methods that you've declared and defined, you should create an interface with those methods, jar that up and stick it in the main lib (for visibilty from your servlet). Create your extension and implement that interface. Then in your servlet you'd just cast the extension to that interface and call its methods.
See this thread: http://www.smartfoxserver.com/forums/viewtopic.php?t=10332
-Andy
For configuring JSP check here
viewtopic.php?t=12275&start=0&postdays=0&postorder=asc&highlight=
viewtopic.php?t=12275&start=0&postdays=0&postorder=asc&highlight=
Who is online
Users browsing this forum: Google [Bot] and 91 guests