LJ Archive
Data packet:
struct CB_Data_Packet {
  int channel;        4 bytes
  int command;        4 bytes
  char handle[20];    20 bytes
  char message[100];  100 bytes
};

Commands:

  1. CB_ON
    Sets up data on server and sends welcome message
  2. CB_OFF
    Closes socket and removes client data from server
  3. SET_CHAN
    Sets the client's channel to the data contained in the channel field.
  4. WHO_CHAN
    Creates a message containing the handles of everyone subscribed to the client's channel and sends it back to the requesting client.
  5. WHO_ALL
    Same as above, but for all channels **not implemented yet**
  6. SVR_STATS
    Send some stats on the server to a client **not implemented yet**
  7. SEND_MESSAGE
    Broadcasts the message contained in the message field to all clients
LJ Archive