Changeset ece0e80 for benchmark/io/http/protocol.cfa
- Timestamp:
- Jan 9, 2021, 4:27:57 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 561dd26
- Parents:
- 35fd2c4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/protocol.cfa
r35fd2c4 rece0e80 71 71 } 72 72 73 [HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len ) {73 [HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len, io_cancellation * cancel) { 74 74 char * it = buffer; 75 75 size_t count = len - 1; … … 77 77 READ: 78 78 for() { 79 int ret = cfa_read(fd, (void*)it, count, 0, -1`s, 0p, 0p);79 int ret = cfa_read(fd, (void*)it, count, 0, -1`s, cancel, 0p); 80 80 // int ret = read(fd, (void*)it, count); 81 81 if(ret == 0 ) return [OK200, true, 0, 0]; … … 148 148 149 149 void ?{}( DateFormater & this ) { 150 ((thread&)this){ *options.clopts.instance };150 ((thread&)this){ "Server Date Thread", *options.clopts.instance }; 151 151 this.idx = 0; 152 152 memset( this.buffers[0].buff, 0, sizeof(this.buffers[0]) ); … … 162 162 163 163 Time now = getTimeNsec(); 164 // Date: Wed, 17 Apr 2013 12:00:00 GMT 164 165 165 strftime( this.buffers[this.idx].buff, 100, "%a, %d %b %Y %H:%M:%S %Z", now ); 166 printf("Changing date to %s\n", this.buffers[this.idx].buff);167 166 168 167 char * next = this.buffers[this.idx].buff;
Note: See TracChangeset
for help on using the changeset viewer.