tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/common jk_channel.h
Date Fri, 16 Nov 2001 22:45:20 GMT
costin      01/11/16 14:45:20

  Modified:    jk/native/common jk_channel.h
  Log:
  Few changes in jk_channel, based on what was required in implementing it.
  
  Revision  Changes    Path
  1.4       +66 -46    jakarta-tomcat-connectors/jk/native/common/jk_channel.h
  
  Index: jk_channel.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_channel.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_channel.h	2001/11/07 21:39:35	1.3
  +++ jk_channel.h	2001/11/16 22:45:19	1.4
  @@ -58,17 +58,19 @@
   #ifndef JK_CHANNEL_H
   #define JK_CHANNEL_H
   
  -
  -#ifdef __cplusplus
  -extern "C" {
  -#endif /* __cplusplus */
  -
   #include "jk_global.h"
   #include "jk_logger.h"
   #include "jk_pool.h"
   #include "jk_msg_buff.h"
   
  +#ifdef __cplusplus
  +extern "C" {
  +#endif /* __cplusplus */
  +
  +struct jk_worker;
  +struct jk_endpoint;
   struct jk_channel;
  +
   typedef struct jk_channel jk_channel_t;
   
   /**
  @@ -95,52 +97,70 @@
    * @author Costin Manolache
    */
   struct jk_channel {
  -  /** Pool for the channel 
  -   */
  -  jk_pool_t *pool;
  -  jk_logger_t *logger;
  -
  -  char *name;
  +    char *name;
   
  -  /** Prepare the channel, check the properties. This 
  -   * will resolve the host and do all the validations.
  -   * ( needed to remove the dependencies on sockets in ajp)
  -   */
  -  int (JK_METHOD *init)(jk_channel_t *_this );
  -  
  -  /** Open the communication channel
  -   */
  -  int (JK_METHOD *open)(jk_channel_t *_this );
  -  
  -  /** Close the communication channel
  -   */
  -  int (JK_METHOD *close)(jk_channel_t *_this );
  -
  +    /** List of properties this channel 'knows'. 
  +     *  This will permit admin code to 'query' each channel
  +     *  and the setting code can better report errors.
  +     */
  +    char **supportedProperties;
  +    
  +    struct jk_worker *worker; /* XXX Do we need it ? */
  +    jk_logger_t *logger;
  +    jk_map_t *properties;
  +    jk_pool_t *pool; /* XXX Do we need it ? */
  +    
  +    
  +    /** Prepare the channel, check the properties. This 
  +     * will resolve the host and do all the validations.
  +     * ( needed to remove the dependencies on sockets in ajp)
  +     * 
  +     * The channel may save or use data from the worker ( like cache
  +     *  the inet addr, etc )
  +     *  XXX revisit this - we may pass too much that is not needed
  +     */
  +    int (JK_METHOD *init)(jk_channel_t *_this,
  +			  jk_map_t *properties,
  +			  char *worker_name,
  +			  struct jk_worker *worker, 
  +			  jk_logger_t *l );
  +    
  +    /** Open the communication channel
  +     */
  +    int (JK_METHOD *open)(jk_channel_t *_this, 
  +			  struct jk_endpoint *endpoint );
  +    
  +    /** Close the communication channel
  +     */
  +    int (JK_METHOD *close)(jk_channel_t *_this, 
  +			   struct jk_endpoint *endpoint );
  +    
     /** Send a packet
  -   */
  -  int (JK_METHOD *send)(jk_channel_t *_this,
  -			jk_msg_buf_t *b );
  -
  -  /** Receive a packet
      */
  -  int (JK_METHOD *recv)(jk_channel_t *_this,
  -			jk_msg_buf_t *b );
  -
  -  /** Set a channel property. Properties are used to configure the 
  -   * communication channel ( example: port, host, file, shmem_name, etc).
  -   */
  -  int (JK_METHOD *setProperty)(jk_channel_t *_this, 
  -			       char *name, char *value);
  -
  -  /** Get a channel property 
  -   */
  -  int (JK_METHOD *getProperty)(jk_channel_t *_this, 
  +    int (JK_METHOD *send)(jk_channel_t *_this,
  +			  struct jk_endpoint *endpoint,
  +			  char *b, int len );
  +    
  +    /** Receive a packet
  +     */
  +    int (JK_METHOD *recv)(jk_channel_t *_this,
  +			  struct jk_endpoint *endpoint,
  +			  char *b, int len );
  +    
  +    /** Set a channel property. Properties are used to configure the 
  +     * communication channel ( example: port, host, file, shmem_name, etc).
  +     */
  +    int (JK_METHOD *setProperty)(jk_channel_t *_this, 
  +				 char *name, char *value);
  +    
  +    /** Get a channel property 
  +     */
  +    int (JK_METHOD *getProperty)(jk_channel_t *_this, 
   			       char *name, char **value);
  -
  -  void *_privatePtr;
  -  int _privateInt;
  +    
  +    void *_privatePtr;
   };
  -
  +    
   #ifdef __cplusplus
   }
   #endif /* __cplusplus */
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message