Sending a chat message to Smartfox from C#

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
fire
Posts: 5
Joined: 23 Dec 2007, 19:05
Contact:

Sending a chat message to Smartfox from C#

Post by fire »

Can I connect to the Smartfox server from a C# program, and send a chat message to it?

Is this possible?
Fire Preibisch
Dr_Malito
Posts: 18
Joined: 13 Dec 2006, 20:52
Location: Chile
Contact:

Post by Dr_Malito »

Smartfox sends a message using sockets, you can catch it from many languages like C#, but there is a protocol around it, the Flash API is a client for that protocol that translate these messages to flash objects, maybe you'll have to create a C# API to catch friendly the messages.
fire
Posts: 5
Joined: 23 Dec 2007, 19:05
Contact:

flash objects

Post by fire »

Thankd Dr. Malito for replying. So, if I can create a flash object in C#, I can send messages to smartfox server from C#?

Ill see what I can find about doing this. I WAS able to connect, but smartfox just doesnt respond. Ill see what I can find - Cheers
Fire Preibisch
fire
Posts: 5
Joined: 23 Dec 2007, 19:05
Contact:

XmlTextReader

Post by fire »

in doing some quick searches... I found info about the XmlTextReader and XmlTextWriter classes.... now I guess it would be important to find out the format of the xml files Smartserver is waiting for and expecting...

Do you know what Smartserver accepts as server commands?
Fire Preibisch
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Fire,
you can analyse the SFS protocol by simply checking the debug output in Flash. ( Simply launch one of our simple examples in Flash and follow the data dump )

Additionally we provide the Actionscript API sources so it wouldn't be too difficult to port the at least the essential API functionalities to C# ( Actionscript is also very similiar to C# )

FYI: all messages sent and receieved by SFS are essentially strings terminated by a 0x00 byte. ( which is the format supported by the XMLSocket class in Flash )
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply