AS[ORG] Socket Server

 

Outgoing Commands

 

CONN|name

 

Parameters

 

CONN| - Initializes a connection to the socket server. Use this to get a list of all the users in the chat

name - the name of the person who just joined the chat

 

 

CHAT|message

 

Parameters

 

CHAT| - Indicates a regular message, anything within the parameter message will be sent to all clients connected

message - the string to be sent to all clients

 

 

PRIV|from|message|to

 

Parameters

 

PRIV| - Indicates a private message, only clients with a username that matches the parameter to or from will get the message

from - the name of the person who sent the message

message - the string containing the message to send to the person indicated by the from parameter

to - the name of the person who will receive the message

 

 

EXIT|name

 

Parameters

 

EXIT| - indicates a person has left the chat, this disconnects the person with the name that matches the parameter name

name - the name of the person to disconnect from the server

 

 

KICK|name|password

 

Parameters

 

This is an administrator command, only people who have the admin password can kick clients from the server

 

KICK| - indicates a removal of a person declared with the parameter name from the server

name - the person to remove from the server

password - the administrator password to the server, only if the password matches can the person be kicked

 

Incoming Commands

 

 

JOIN|name

 

Parameters

 

JOIN| - Sends a message to all clients connected (with the exception of the person who just joined) that a person has joined

name - the name of the person who has just joined the session

 

 

LIST|name

 

Parameters

 

LIST| - Sends a message to the person who just joined with the name of a person already connected, essentially a command to tell flash to add the person to the list

name - the name of the person who should be added to the list of clients connected

 

 

CHAT|message

 

Parameters

 

CHAT| - a regular message, the parameter message should be added to the chat box

message - the string containing the message the person sent

 

 

PRIV|from|message|to

 

Parameters

 

PRIV| - a private message, if the clients username matches the parameter to or from, then they see the message

from - the name of the person who sent the message

message - the string containing the message sent by the person indicated by the from parameter

to - the name of the person who received the message

 

 

EXIT|name

 

Parameters

 

EXIT| - indicates a person has left the chat, use this to remove a persons name from the list of clients connected

name - the name of the person who disconnected from the server

 

 

KICK|name

 

Parameters

 

KICK| - tells flash that the person with the name indicated by the parameter name has been kicked

name - the person who was removed from the server

 

 

QUIT|

 

Parameters

 

QUIT| - tells flash that they have been disconnected from the server, i.e. – the server was shutdown