17 #ifndef HTTP_TEST_COMMON_H
18 #define HTTP_TEST_COMMON_H
20 #include "globus_xio.h"
23 #define PINGPONG_MAX_SIZE 1000000
24 #define THROUGHPUT_MAX_SIZE 1000000
25 #define START_SIZE 1000000
26 #define TCP_BUF_SIZE 80000
37 char * transfer_encoding;
38 globus_xio_driver_t tcp_driver;
39 globus_xio_driver_t http_driver;
40 globus_xio_stack_t stack;
49 int outstanding_operation;
51 globus_xio_server_t server;
52 globus_xio_handle_t handle;
58 globus_hashtable_t uri_handlers;
59 http_test_info_t * info;
60 globus_xio_driver_t http_driver;
66 http_test_info_t * info,
73 typedef void (*globus_xio_http_request_ready_callback_t)(
79 globus_hashtable_t headers);
81 typedef struct _performance_s
83 next_size_func_t next_size;
84 pingpong_func_t pingpong;
91 http_test_server_init(
92 http_test_server_t * server,
93 globus_xio_driver_t tcp_driver,
94 globus_xio_driver_t http_driver,
95 globus_xio_stack_t stack);
98 http_test_server_register_handler(
99 http_test_server_t * server,
101 globus_xio_http_request_ready_callback_t
106 http_test_server_run(
107 http_test_server_t * server);
110 http_test_server_shutdown(
111 http_test_server_t * server);
114 http_test_server_destroy(
115 http_test_server_t * server);
118 http_test_server_respond(
119 http_test_server_t * server,
121 char * reason_phrase,
123 size_t header_array_len);
126 http_test_server_close_handle(
127 http_test_server_t * test_server);
130 http_test_client_request(
131 globus_xio_handle_t * new_handle,
132 globus_xio_driver_t tcp_driver,
133 globus_xio_driver_t http_driver,
134 globus_xio_stack_t stack,
135 const char * contact,
140 size_t header_array_length);
143 http_test_initialize(
144 globus_xio_driver_t * tcp_driver,
145 globus_xio_driver_t * http_driver,
146 globus_xio_stack_t * stack);
154 performance_t * perf,
155 pingpong_func_t pingpong,
156 next_size_func_t next_size,
162 performance_start_slave(
163 performance_t * perf,
164 http_test_info_t * info);
167 performance_start_master(
168 performance_t * perf,
169 http_test_info_t * info);
172 throughput_next_size(
184 throughput_next_size(
189 performance_t * perf,
199 performance_write_timers(
200 performance_t * perf);
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
Globus XIO HTTP Driver Header.
Mutex.
Definition: globus_thread.h:107
Condition variable.
Definition: globus_thread.h:124
size_t globus_size_t
Standard size of memory objectThe globus_size_t is the size of a memory object. It is identical to si...
Definition: globus_types.h:48
unsigned char globus_byte_t
Unsigned byte datatypeThis is used for byte-addressable arrays of arbitrary data which is not subject...
Definition: globus_types.h:85
uint32_t globus_result_t
Definition: globus_types.h:99
globus_xio_http_version_t
Definition: globus_xio_http.h:231