HTML and CSS Reference
The Basic Architecture of an ElectroServer Application
ElectroServer acts very much like the socket-server application we described in the previous
section. It listens on specified ports for different protocols; when messages arrive, they are
routed back to the connected clients.
on other socket-server platforms, while some don't. However, much of this discussion will
The client for an ElectroServer application is a program written in one of the API-supported
language platforms, including Flash ActionScript 2, Flash ActionScript 3, Java, Objective-C,
world, or some other kind of multiuser social or communication application.
All the communication with ElectroServer is event -based. The client application uses the
from ElectroServer. All of these messages and events are communicated through the API,
which in turn is communicating through port 8989 using the BinaryHTTP protocol (at least
for our examples).
Zones, rooms, and games
WhenauserfirstconnectstoElectroServer,sheneedstojoinorcreatea zone ,whichissimply
a collection of rooms. If the user tries to create a zone that already exists, she will be added to
that zone without creating a new one.
After entering a zone, the user needs to join a room in that zone. If a user attempts to create a
new room that already exists, she will be added to that room instead.
Beyond zones and rooms, ElectroServer also offers a GameManager API that allows you to further
segment users into specific instances of a game that is being played. We do not get this granular for
the examples in this chapter.
Extensions are server-side code modules that can process data sent by clients before that data