Page 1 of 1
Sending a chat message to Smartfox from C#
Posted: 28 Dec 2007, 08:01
by fire
Can I connect to the Smartfox server from a C# program, and send a chat message to it?
Is this possible?
Posted: 28 Dec 2007, 19:32
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.
flash objects
Posted: 29 Dec 2007, 06:04
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
XmlTextReader
Posted: 29 Dec 2007, 06:15
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?
Posted: 29 Dec 2007, 08:06
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 )