At 2/2/14 07:58 PM, egg82 wrote:
UDP IS supported. It's the DatagramSocket class. TCP servers and UDP sockets are only supported in AIR, however. TCP clients work just fine in the regular web Flash player.
And I'm not using or targeting AIR, which is why I said I can't use UDP. I never said UDP isn't supported by AS3, I said it's not supported by Flash Player.
Not that I would want to use UDP even if I could since I need my server to implement TCP.
At 2/2/14 07:58 PM, egg82 wrote:
Flash is actually more tedious than most languages in the fact that you need to do some odd security stuff for our client/server communication to actually work beyond localhost.
That would be the trivial policy request message that needs to be responded to with a tiny blurb of XML that I was referring to, which I would not describe as tedious. It takes like four lines of code for my server to handle that. You don't need to use the Security.loadPolicyFile() function (I'm not), though you can if you want to.
If you want tedious try implementing the WebSocket protocol, specifically the opening handshake.
At 2/2/14 08:17 PM, Glaiel-Gamer wrote:
As much as I love C++ I just have to say network code is 6000% easier in a language that has built in reflection like C#.
No doubt, but I don't know C#, and C++ is the most powerful language that I know which will be able to handle what I'm going to throw at it. I made a proof of concept in Python (this really, really terrible code [seriously it's awful, be afraid]) to see how well it could handle constantly sending and receiving data via TCP, and it only took more than two clients connected for noticeable lag to appear.
Using the Boost.Asio library makes writing networking code a breeze compared to the OS-specified crap you would normally need to use. It took me a couple days of reading to learn how Boost.Asio works, but now that I know it's easy as pie. Not as easy as writing networking code in Python, but still easy nonetheless. I really love Boost.