500 users license
$700

Saturday, February 2, 2008

ElectroServer 4.0.4 Released!

We have been working hard on some great new features and are pleased to announce the release of ElectroServer 4.0.4!

True Binary Support
ElectroServer has had binary support since 4.0.0 but the client-side API didn't have it fully implemented. Now the ActionScript 3 client-side API fully supports the binary protocol giving game developers super high performance messaging!

When we say true binary support we mean true binary support. Our protocol reads and writes directly from a ByteArray utilizing all appropriate data types. (We have seen how some servers actually send a huge XML string over the binary socket wrapping their overly bloated string protocol which will actually decrease performance while buying you nothing.)

So what is so cool about binary? Stay-tuned for some future blog posts on this subject, but here are a few things to get you interested:
  • Lowest impact messaging possible in Flash. Smallest message sizes with shorter parsing times.
  • The ability to send/receive binary data. You can send screen data as a private message from one user to another, or to the server to be saved, or...[insert idea here].
  • Unique security ideas (future blog post plug)

To use the new binary protocol you need to have the ActionScript 3 client-side API. It won't work with ActionScript 2 because ActionScript 2 doesn't support binary socket or ByteArrays.

To enable the binary protocol in a Flash client you do the following:

  1. Import this: com.electrotank.electroserver4.entities.Protocol
  2. Add this line of code before creating a connection: ElectroServer.PROTOCOL = Protocol.BINARY;
  3. You'll also need to add a new gateway listener for binary, or modify the existing text listener for binary. (See the 'Gateways' button at the top of the web-based admin). Restart ES4 to take effect.

That's it! Nothing else changes. But now you can use the setByte/getByte and setByteArray/getByteArray methods of the EsObject in very interesting and useful ways.

EsObject Additions

EsObject is used all throughout ElectroServer to carry custom data between client and server, client and client, and between server extensions. While incredibly useful it is a little tough to debug sometimes. So on the ActionScript 2 and ActionScript 3 APIs we added an EsObject.toString() method that allows you to easily view the contents of the EsObject. See this post for more information.

On the server-side of things some added validation has been added to EsObject. This will ensure that you don't accidentally set null values on it. In 4.0.5 expect a server-side EsObject.toString() method as well.

There were some other interesting additions to this release that we'll talk about in future posts!