~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XML Protocol
ElectroServer version 1.0
4/1/02
For the most recent updates visit: http://www.electrotank.com/ElectroServer
Description:
This file contains the XML protocol used to communicate between Flash and ElectroServer.
ElectroServer is a socket server built with chat and multiplayer games in mind.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=~=~=~=~=~=~=~=~=~=~=~=~
Receiving Data
=~=~=~=~=~=~=~=~=~=~=~=~
-------
When socket connection has been established
-------
Description: Sent to the user by the server when a connection is established.
ConnectionAccepted
-------
Response to the login request
-------
If login is accepted
LoginResponse
accepted
If login is not valid
LoginResponse
denied
Your username is in use
-------
User List
-------
Description: Cotains a list of users in a specific room.
Example (room with 2 users)
UserList
jobem
kam
-------
room List
-------
Description: Cotains a list of all rooms that have not been hidden.
roomList
Lobby2
Lobby1
-------
User Joined
-------
Description: The name of a user that just joined the room that you are in
UserJoined
jobem
-------
User Left
-------
Description: The name of a user that just left your room
UserLeft
jobem
=~=~=~=~=~=~=~=~=~=~=~=~
Sending Data
=~=~=~=~=~=~=~=~=~=~=~=~
-------
Login
-------
Description: Sets a username to your connection. The password node is required but the password is optional. For the server to recognize a user as an admin, the user must provide a password. (note: The Account Administrator program is needed to create an admin account.)
Login
myName
myPassword
-------
Join a room
-------
Description: This allows you to join a room. If a room that you are trying to join does not yet exist, then the room is created.
Special attributes:
Updatable="true" means that the room receives an updated room list when available. If "false" then it receives no information about other rooms. The general rule of thumb is that this value should be false if the room is hosting a game and true if it is a chat room.
hidden="false" means that the room is sent in the room list to all rooms that are updateable. If hidden has a value of "true" then this room is not sent in the room list updates to all of the other rooms. This is good for rooms that are intended for hosting a game.
JoinRoom
Lobby2
-------
Send a Message
-------
Description: This sends a message to everyone in a room or to a specific user.The node should contain "All" to send a message to everyone in the room. Or to send a private message to a specific user, for instance "jobem", the node should have a value of "jobem".
The attributes in the Message can be anything that you want. The server disregards them. They are there so that you can send your own custom "types" of messages. For instance, it makes sense to change Type="Private" when a message is private so the receiving SWF knows.
SendMessage
All
jobem
Hello World
=~=~=~=~=~=~=~=~=~=~=~=~
room Variables
=~=~=~=~=~=~=~=~=~=~=~=~
-------
Create or change a room variable
-------
Description: This allows you to create a variable saved to your room on the server. Every connected person in that room receives an update when a variable is created, edited, or delted.
Special attributes:
deleteOnExit="True" deletes a room variable created by a user when that user leaves the room. deleteOnExit="False" sets a variable so that it will not be deleted until told to or when the room contains 0 people.
locked="True" keeps a variable from being updated after it is created, although it can still be deleted. locked="False" allows a variable to be updated.
UpdateRoomVariable
jobem
myColor
purple
-------
Room Variable List
-------
Description: On entering a room the list of all variables associated with that room are sent to you.
Example (2 variables):
UpdateRoomVariable
door1
safety
door2
certain death
-------
To delete a room variable
-------
Description: Deletes any variable from the room, even locked ones.
DeleteRoomVariable
door1
=~=~=~=~=~=~=~=~=~=~=~=~
Admin stuff
=~=~=~=~=~=~=~=~=~=~=~=~
-------
kicking a user
-------
Description: Disconnects a user from the server. This is a feature only available to a user logged in as an admin.
Kick
jobem
foul language
-------
Banning
-------
Description: Bans a user from the server. The user's IP address is stored and compared against all incoming connections.
Ban
jobem
foul language