Click here to Skip to main content
15,889,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, I'm new in socketing, I want to ask how can I send and receive data from flash to C#(console program) and from C# to flash. C# as a server and flash as client (many flash client connect to 1 c# program)? (without using XML, only using action script in flash)
Posted

Use a TcpListener on the C# side, and a flash.net.Socket[^] on the Flash side. If you have a specific protocol for the data you want to send, you will need to implement that on both sides.

I have a functional version of the client part of my socket library in Flash (AS3), minus the RSA portion (I couldn't find that in the libraries). If you start from a working C# socket implementation the Flash version is quite similar, once you hook up the events as the example shows.

Don't forget to put a crossdomain.xml on your site if the Flash is externally hosted, otherwise you won't be able to connect.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900