Posts Tagged ‘Socket server’

Flex XML socket connections

November 15th, 2011 by aabhaanjan

Binary Socket Server flex and Java

Before the example I would like give you a brief about XML connections :

XML socket connections vs binary socket connections:
1. An XMLsocket lets create a server connection that remains open until explicitly closed.
2. No need to having to continually open new server connections.
3. No need to explicitly request for sending  data.
The protocol used by the XMLSocket class are :
* XML messages are sent over a full-duplex TCP/IP stream socket connection.
* Each XML message is a complete XML document, terminated by a zero (0) byte.
* An unlimited number of XML messages can be sent and received over a single XMLSocket connection.
XMLSocket has no HTTP tunneling capability.

XML socket connections vs binary socket connections:

1. An XMLsocket lets create a server connection that remains open until explicitly closed.

2. No need to having to continually open new server connections.

3. No need to explicitly request for sending  data.

The protocol used by the XMLSocket class are :

* XML messages are sent over a full-duplex TCP/IP stream socket connection.

* Each XML message is a complete XML document, terminated by a zero (0) byte.

* An unlimited number of XML messages can be sent and received over a single XMLSocket connection.

Note : XMLSocket has no HTTP tunneling capability.
[xml]
<?xml version=”1.0″ encoding=”utf-8″?>
<s:Application xmlns:fx=”http://ns.adobe.com/mxml/2009″
xmlns:s=”library://ns.adobe.com/flex/spark”
xmlns:mx=”library://ns.adobe.com/flex/mx”
>
<fx:Script>
<![CDATA[

import com.*;
import mx.controls.Alert;
private var _xmlSocket:XMLSocketClient

private function connectToServer(event:MouseEvent):void {
try{
trace(‘Client is trying to connect with server’)
_xmlSocket = new XMLSocketClient()
}
catch(err:Error){
Alert.show(‘error’+err.name);
}
}
private function sendData():void
{
_xmlSocket.send(msg_txt.text);
}
private function onDisconnectClicked():void
{
_xmlSocket.disconnect();
}

]]>
</fx:Script>

<s:Button x=”327″ y=”40″ label=”Disconnect” width=”95″ id=”disconnect_btn” click=”onDisconnectClicked()”/>

<s:Button x=”213″ y=”126″ label=”Send” width=”95″ id=”send_btn” click=”sendData()”/>

<s:TextInput x=”124″ y=”96″ width=”298″ id=”msg_txt” maxChars=”100″/>

<s:Button x=”183″ y=”74″ width=”125″ height=”41″ label=”Connect” click=”connectToServer(event)”/>

</s:Application>
[/xml]

Tags: , , , , , , , , , ,

SmartFox server Chapter- 01-Inroduction and Installation

March 21st, 2010 by aabhaanjan

Starting with SmartFox Server after its Installation :

Go to Program files then SmartFoxServerPro_1.6.6 you will see list of items of Smartfox

Admin : From where you can handle all the events and can see the server status.

Docs: Where you can find the documents of Smartfox , you can find here all the detail and

Helpful  material.

Server :  From where you can edit and Install/Uninstall Services.

ServerDetail

Examples : A lot of examples are stored here . J

Flash API : API of AS2.0  and AS 3.0 are stored here.

How to change the IP

Open Edit Config as per given figure :

Server Config

After opening config you can change the IP as example given below.

change IP

Changing the admin login and password .

change password

Opening Admin panel: When you will open the admin  panel you will be able to see login credential fields , where by entering correct Username and password you will be able to enter into the admin panel.

AdminPanel

OpenedAdminPanel

Inside the admin panel you will be able to see below mentioned figure. It have various components .

InsideTheadminPanel

Zone browser :

It will show all the created  zones and associated rooms detail.

ZoneLevelDetail

Ban Manager : From where you can see the Banned User and IP details.

bannedUserDetail

Logs : Here you will find all the  written record of messages sent or received and activity done by the

User.

logDetail

Extension manager :

Here you can see and edit all used extensions .

ExtensionDetail

Keep watching coming soon , with next chapter 🙂

Next Chapter

Tags: , , , , , , , , , , , , , ,