Project

General

Profile

Revision 145

Added by Jason knichel over 16 years ago

moved some code into their own private methods

View differences:

ConnectionPool.h
25 25
#define ERROR_INVALID_MESSAGE           -7
26 26
#define ERROR_INVALID_MESSAGE_LENGTH    -8
27 27

  
28
#define DECREMENT_INDEX_COUNTER          1
29

  
28 30
#define MAX_CONNECTIONS 250
29 31
#define READ_BUFFER_SIZE 1024
30 32
#define WRITE_BUFFER_SIZE 4096
......
35 37
  ConnectionPool();
36 38
  ~ConnectionPool();
37 39

  
38
  //TODO: restructure the class to get rid of exposing so much stuff
39

  
40 40
  int add_client(int client_file_descriptor);
41 41
  int remove_client(int pool_index);
42 42
  int check_clients();
......
64 64
  char * write_buffer[MAX_CONNECTIONS];
65 65
  int write_buffer_size[MAX_CONNECTIONS];
66 66

  
67
  int parse_command(char* command, int pool_index);
68
  int tokenize_command(char* command, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE]);
69
  int check_tokens(unsigned char* tokens, int number_tokens);
67
  int read_data(int pool_index, int client_file_descriptor);
68
  int write_data(int pool_index, int client_file_descriptor);
70 69
};
71 70

  
72 71
#endif

Also available in: Unified diff