I’m working on a flash application that needs to communicate with my C++ server for things like account validation and state updates. I have a non-blocking TCP socket on the server listening on a specific port.
The process goes like this:
- Socket listens on server machine
- Flash connects using a flash.net.Socket
- Server accepts socket connection
- Flash sends a policy file request
- Server sends policy file data
- Flash accepts connection
Two problems occur from here on out. When I send bytes from flash the server doesn’t recognize it at all but it doesn’t block either. I just recv 0 bytes. When I send bytes from the server after sending the policy file I gives me a WSAECONNRESET error.
Resources for Flash communicating with C or C++ is very limited so any help is greatly appreciated.
When the flash client sends
"<policy-file-request/>"the server should send the file and then close the connection.The client will need to reconnect after it receives the policy.
Trust me on this.