Changes in benchmark/io/http/protocol.cfa [e95a117:c82af9f]
- File:
-
- 1 edited
-
benchmark/io/http/protocol.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/protocol.cfa
re95a117 rc82af9f 25 25 }; 26 26 27 _Static_assert( KNOWN_CODES == (sizeof(http_msgs ) / sizeof(http_msgs [0]))); 28 29 const int http_codes[] = { 30 200, 31 400, 32 404, 33 413, 34 414, 35 }; 36 37 _Static_assert( KNOWN_CODES == (sizeof(http_codes) / sizeof(http_codes[0]))); 38 39 int code_val(HttpCode code) { 40 return http_codes[code]; 41 } 27 _Static_assert( KNOWN_CODES == (sizeof(http_msgs) / sizeof(http_msgs[0]))); 42 28 43 29 static inline int answer( int fd, const char * it, int len) { … … 75 61 for() { 76 62 int ret = cfa_read(fd, it, count); 77 if(ret == 0 ) return [OK200, true, 0p, 0];78 63 if(ret < 0 ) { 64 if( errno ) return [OK200, true, 0p, 0]; 79 65 if( errno == EAGAIN || errno == EWOULDBLOCK) continue READ; 80 66 abort( "read error: (%d) %s\n", (int)errno, strerror(errno) );
Note:
See TracChangeset
for help on using the changeset viewer.