SmartFox server : Connecting to the server

After a very horrible experience of using Red5 recently i recently started exploring SmartFox server.Must say that the initial expression is excellent.Server configurations are easy and development is straight forward.Also there is extensive help available on smartFox website. And the best thing is server is that unlike Red5, smartfox is not limited to flash action script.You can connect it to through .net,java and today i even connected it through objective-C.

Here is simple tutorial on how to connect and make  connection to smartfox server.

1:Setting up connection String

   1: var ip = "";

   2: var port = 9339;

   3: var zone = "simpleChat";

2:Creating connection

   1: //connect to server

   2: var smartfox:SmartFoxClient = new SmartFoxClient(true);

   3: smartfox.addEventListener(SFSEvent.onConnection, handleConnection);

   4: smartfox.connect(ip, port);

3:Handling connection event

   1: function handleConnection(evt:SFSEvent):void

   2: {

   3:         var ok:Boolean = evt.params.success;

   4:         if (ok)

   5:         {

   6:                 txt_window.text = "Connection succesfull!";

   7:                 trace("Connection succesfull!");

   8:         }

   9:         else

  10:         {

  11:                 txt_window.text = "Can't connect!";

  12:                 trace("Can't connect!");

  13:         }

  14: }     

And that’s all you need to do to make connection to server and get the success/fail event.


Exemplary Behavior of an Exemplary Leader

it was year 637 AD. Caliph Umar Muslim Army had Just accepted the surrender of the city of Jerusalem after a four month siege. As Hazrat Umar entered Jerusalem Patriarch of Jerusalem Sophroniu gave Him tour of the city.At the hour of prayer they stood together in the church the Holy Sepulchre,Sophronius invited Umar to pray in the Church; “No,” replied Umar, “If I do so, the Muslims one day might take this as an excuse to take the church from you.” So Umar prayed on the steps of the church. He then gave the Bishop a pact that forbade the Muslims from ever praying on the steps of the church.


“I am reading "A History of the Crusades" by Steven Runciman and will be stating major historical facts about crusades on my blog from time to time“