Difference for socket/loop.c from version 1.25 to 1.26


version 1.25 version 1.26
Line 1
 
Line 1
   
 /*  /*
  * static char *rcsid_loop_c =   * static char *rcsid_loop_c =
  *    "$Id: loop.c,v 1.25 2003/09/13 05:02:14 mwedel Exp $";   *    "$Id: loop.c,v 1.26 2003/12/02 18:51:44 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 27
 
Line 27
     The author can be reached via e-mail to crossfire-devel@real-time.com      The author can be reached via e-mail to crossfire-devel@real-time.com
 */  */
   
 /* socket.c mainly deals with initialization and higher level socket  /**
    * \file
    * Main client/server loops.
    *
    * \date 2003-12-02
    *
    * loop.c mainly deals with initialization and higher level socket
  * maintenance (checking for lost connections and if data has arrived.)   * maintenance (checking for lost connections and if data has arrived.)
  * The reading of data is handled in ericserver.c   * The reading of data is handled in ericserver.c
  */   */
Line 84
 
Line 90
     uint8   flag;      uint8   flag;
 };  };
   
 /*  /**
    * Dispatch table for the server.
    *
  * CmdMapping is the dispatch table for the server, used in HandleClient,   * CmdMapping is the dispatch table for the server, used in HandleClient,
  * which gets called when the client has input.  All commands called here    * which gets called when the client has input.  All commands called here
  * use the same parameter form (char* data, int len, int clientnum.   * use the same parameter form (char* data, int len, int clientnum.
Line 109
 
Line 117
     { NULL, NULL} /* terminator */      { NULL, NULL} /* terminator */
 };  };
   
   /** Face-related commands */
 static struct NsCmdMapping nscommands[] = {  static struct NsCmdMapping nscommands[] = {
     { "addme", AddMeCmd },      { "addme", AddMeCmd },
     { "askface", SendFaceCmd}, /* Added: phil */      { "askface", SendFaceCmd}, /* Added: phil */
Line 122
 
Line 131
     { NULL, NULL} /* terminator */      { NULL, NULL} /* terminator */
 };  };
   
 /* RequestInfo is sort of a meta command - there is some specific  /**
    * RequestInfo is sort of a meta command. There is some specific
  * request of information, but we call other functions to provide   * request of information, but we call other functions to provide
  * that information.   * that information.
  */   */
Line 155
 
Line 165
     else Write_String_To_Socket(ns, bigbuf, len);      else Write_String_To_Socket(ns, bigbuf, len);
 }  }
   
   /**
    * Handles old socket format.
    */
 void Handle_Oldsocket(NewSocket *ns)  void Handle_Oldsocket(NewSocket *ns)
 {  {
     int stat,i;      int stat,i;
Line 282
 
Line 295
 }  }
   
   
 /* HandleClient is actually not named really well - we only get here once  /**
    * Handle client input.
    *
    * HandleClient is actually not named really well - we only get here once
  * there is input, so we don't do exception or other stuff here.   * there is input, so we don't do exception or other stuff here.
  * sock is the output socket information.  pl is the player associated   * sock is the output socket information.  pl is the player associated
  * with this socket, null if no player (one of the init_sockets for just   * with this socket, null if no player (one of the init_sockets for just
Line 385
 
Line 401
  ******************************************************************************/   ******************************************************************************/
   
 #ifdef WATCHDOG  #ifdef WATCHDOG
 /*  /**
  * Tell watchdog that we are still alive   * Tell watchdog that we are still alive
    *
  * I put the function here since we should hopefully already be getting   * I put the function here since we should hopefully already be getting
  * all the needed include files for socket support    * all the needed include files for socket support
  */   */
Line 415
 
Line 432
   
 extern unsigned long todtick;  extern unsigned long todtick;
   
   /** Waits for new connection */
 static void block_until_new_connection()  static void block_until_new_connection()
 {  {
   
Line 456
 
Line 474
 }  }
   
   
 /* This checks the sockets for input and exceptions, does the right thing.  A   /**
  * bit of this code is grabbed out of socket.c   * This checks the sockets for input and exceptions, does the right thing.
    *
    * A bit of this code is grabbed out of socket.c
  * There are 2 lists we need to look through - init_sockets is a list   * There are 2 lists we need to look through - init_sockets is a list
  *    *
  */   */


Legend:
line(s) removed in v.1.25 
line(s) changed
 line(s) added in v.1.26

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:35