Changeset ba77750


Ignore:
Timestamp:
Jan 9, 2021, 4:50:51 PM (8 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
77fde9d
Parents:
108f98b2
Message:

Missing commits for plaintext

Location:
benchmark/io/http
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/protocol.cfa

    r108f98b2 rba77750  
    4747        while(len > 0) {
    4848                // Call write
    49                 int ret = write(fd, it, len);
     49                int ret = cfa_write(fd, it, len, 0, -1`s, 0p, 0p);
    5050                if( ret < 0 ) { if( errno != EAGAIN && errno != EWOULDBLOCK) abort( "'answer error' error: (%d) %s\n", (int)errno, strerror(errno) ); }
    5151
     
    7070        return answer( fd, buffer, len );
    7171}
     72
     73int answer_plain( int fd, char buffer[], size_t size ) {
     74        int ret = answer_header(fd, size);
     75        if( ret < 0 ) return ret;
     76        return answer(fd, buffer, size);
     77}
     78
    7279
    7380[HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len, io_cancellation * cancel) {
  • benchmark/io/http/protocol.hfa

    r108f98b2 rba77750  
    1616int answer_error( int fd, HttpCode code );
    1717int answer_header( int fd, size_t size );
     18int answer_plain( int fd, char buffer [], size_t size );
    1819
    1920[HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len, io_cancellation *);
Note: See TracChangeset for help on using the changeset viewer.