Index: trunk/code/projects/colonet/ColonetServer/ConnectionPool.cpp
===================================================================
--- trunk/code/projects/colonet/ColonetServer/ConnectionPool.cpp	(revision 28)
+++ trunk/code/projects/colonet/ColonetServer/ConnectionPool.cpp	(revision 29)
@@ -1,4 +1,6 @@
 /**
+ * @file ConnectionPool.cpp
+ *
  * @author Jason Knichel
  * @date 7/22/07
  */
@@ -15,6 +17,9 @@
 #include "includes/client.h"
 #include "../lib/colonet_defs.h"
 
+/**
+ * @brief The default constructor for ConnectionPool
+ */
 ConnectionPool::ConnectionPool() {
   max_file_descriptor = 0;
   next_available_slot = 0;
@@ -31,9 +36,19 @@
   memset(&write_buffer_size, 0, sizeof(int)*MAX_CONNECTIONS);
 }
 
+/**
+ * @brief The destructor for ConnectionPool
+ */
 ConnectionPool::~ConnectionPool() {
 }
 
+/**
+ * @brief Adds a client to the connection pool
+ *
+ * @param client_file_descriptor The file descriptor to add to the connection pool
+ *
+ * @return 0 on success, negative error code on failure
+ */
 int ConnectionPool::add_client(int client_file_descriptor) {
   if (client_file_descriptor < 0) {
     return ERROR_INVALID_CLIENT_DESCRIPTOR;
@@ -71,6 +86,13 @@
   return 0;
 }
 
+/**
+ * @brief Removes a client from the connection pool
+ *
+ * @param The index in the pool of the client to remove
+ *
+ * @return 0 on success, negative error code on failure
+ */
 int ConnectionPool::remove_client(int pool_index) {
   if (pool_index < 0 || pool_index >= next_available_slot) {
     return ERROR_INVALID_CLIENT_DESCRIPTOR;
@@ -111,6 +133,16 @@
   return 0;
 }
 
+/**
+ * @brief Checks the status of the clients
+ *
+ * Sees is any clients are ready to read from their file descriptor or are
+ *  ready to write to their file descriptor.
+ *
+ * @param wireless A pointer to the wireless object
+ *
+ * @return 0 on success, negative error code on error
+ */
 //TODO: test that it drops commands properly if it gets sent too much data
 //      do we want it to drop the data or drop the connection?
 int ConnectionPool::check_clients(ColonetWireless * wireless) {
@@ -218,6 +250,16 @@
   return 0;
 }
 
+/**
+ * @brief Puts text into a write buffer that will be written to a client's file
+ *  descriptor sometime when the client is ready to write.
+ *
+ * @param pool_index Index in the pool of the client to write to
+ * @param message The message to be written
+ * @param length The length of the message
+ *
+ * @return 0 on success, negative error code on failure
+ */
 int ConnectionPool::write_to_client(int pool_index, char * message, int length) {
   if (pool_index < 0 || pool_index >= next_available_slot) {
     return ERROR_INVALID_CLIENT_ID;
@@ -244,12 +286,29 @@
   return 0;
 }
 
-
+/**
+ * @brief Sets the socket to listen on
+ *
+ * @param listen_socket The socket to listen on
+ *
+ * @return void
+ */
 //TODO: put error checking on listen_socket to make sure its a valid socket
 void ConnectionPool::set_listen_socket_in_ready_set(int listen_socket) {
   FD_SET(listen_socket, &ready_set);
 }
 
+/**
+ * @todo Since the listen socket is now a member of the class, the first parameter can be removed
+ * @todo Does the select timeout need to be passed in?  or can it be specified in the method?
+ *
+ * @brief Find out what file descriptors are ready to write to and read from
+ *
+ * @param listen_socket The socket to listen on
+ * @param select_timeout The timeout for the select statement
+ *
+ * @return 0
+ */
 int ConnectionPool::perform_select(int listen_socket, struct timeval * select_timeout) {
   read_set = ready_set;
   write_set = ready_set;
@@ -315,7 +374,7 @@
 //TODO: fix names of variables to obey new style
 int ConnectionPool::parse_command(char* command, int pool_index, ColonetWireless * wireless) {
   char tokens[MAX_TOKENS][MAX_TOKEN_SIZE];
-  unsigned char int_tokens[MAX_TOKENS];
+  unsigned cnhar int_tokens[MAX_TOKENS];
   int numTokens = 0;
   char* endptr = NULL;
   int commandID;
Index: trunk/code/projects/colonet/ColonetServer/ColonetServer.cpp
===================================================================
--- trunk/code/projects/colonet/ColonetServer/ColonetServer.cpp	(revision 28)
+++ trunk/code/projects/colonet/ColonetServer/ColonetServer.cpp	(revision 29)
@@ -1,4 +1,5 @@
-/** @file ColonetServer.cpp
+/** 
+ * @file ColonetServer.cpp
  *
  * @brief colonet_server - primary server application for Colonet
  *
@@ -29,13 +30,27 @@
 
 ConnectionPool * connection_pool;
 
+/**
+ * @brief Default constructor for ColonetServer
+ */
 ColonetServer::ColonetServer(): logger("logFile.txt") {
   listen_socket = 0;
 }
 
+/**
+ * @brief Destructor for ColonetServer
+ */
 ColonetServer::~ColonetServer() {
 }
 
+/**
+ * @brief Initializes the various elements needed for the server to run
+ *
+ * @param argc The number of command line arguments passed to the program
+ * @param argv The command line arguments passed to the program
+ *
+ * @return 0 on success, negative error code on failure
+ */
 int ColonetServer::initialize_server(int argc, char * argv[]) {
   printf("Initializing Server...\n");
 
@@ -53,6 +68,11 @@
   return 0;
 }
 
+/**
+ * @brief Starts the server listening on the socket that was opened for listening
+ *
+ * @return 0 on success, negative error code on failure
+ */
 int ColonetServer::start_listening() {
   if (listen(listen_socket, LISTEN_BACKLOG) < 0) {
     log_error("\t\nThere was an error telling the socket to "
@@ -62,14 +82,23 @@
   return 0;
 }
 
+/**
+ * @brief Logs an error message to the log file
+ */
 int ColonetServer::log_error(char * error_message) {
   return logger.logMessage(LOG_TYPE_ERROR, error_message);
 }
 
+/**
+ * @brief Logs a message to the log file
+ */
 int ColonetServer::log_message(char * message) {
   return logger.logMessage(LOG_TYPE_MESSAGE, message);
 }
 
+/**
+ * @brief Starts the server running (starts an infinite loop)
+ */
 int ColonetServer::run_server() {
   connection_pool.set_listen_socket_in_ready_set(listen_socket);
 
@@ -135,10 +164,21 @@
   return 0;
 }
 
+/**
+ * @todo This method is here because the wireless message handler has a dependency on the connection_pool
+ *  This should be removed when that dependency is broken
+ *
+ * @return A pointer to the connection pool
+ */
 ConnectionPool * ColonetServer::get_connection_pool_pointer() {
   return &connection_pool;
 }
 
+/**
+ * @brief Initializes the wireless
+ *
+ * @return 0 on success, negative error code on error
+ */
 int ColonetServer::initialize_wireless() {
   char* log_filename = NULL;
 
@@ -159,6 +199,13 @@
 	return 0;
 }
 
+/**
+ * @brief Initialize a connection to listen on
+ *
+ * @port The port to try to open to listen on
+ *
+ * @return 0 on success, negative error code on error
+ */
 int ColonetServer::initialize_connection(int port) {
   printf("Initializing connection that will be used to listen for " 
          "clients...\n");
@@ -201,6 +248,14 @@
   return 0;
 }
 
+/**
+ * @brief The main function of the server
+ *
+ * @param argc The number of command line arguments passed to the program
+ * @param argv The command line arguments passed to the program
+ *
+ * @return 0 on success, negative error code on error
+ */
 int main(int argc, char** argv) {
   ColonetServer colonet_server;
 
