简体   繁体   中英

How to receive commands from Socket in Actionscript 3?

I finally managed to get a server working (after 2 days playing with java lol) so i can connect with it using sockets. But what bothers me is, let's say I connected both clients to the server using these sockets How can i send commands, for example attack from one client to the other?

I hope you get my point lol :/ PS:I'm using java for the server, as3 for the client

Thanks in advance anyway...

You need to add either BlazeDS (a little outdated) or GraniteDS (newer and in my opinion works better), I do think BlazeDS was a little easier to get going with.

They are both based on using a java webservlet and actionscripts AMF format to allow communication with a flash/actionscript client.

The other option is to use some form of C/C++/C# to actually talk binary. This is extremely efficient if you want to create your own protocol. On the other hand this means more work :).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM