Overview
SHA1 Hash: | 63ef585508a08ac847390be8506082ae098bd62e |
---|---|
Date: | 2009-03-30 01:12:04 |
User: | drh |
Comment: | Add new "transport_flip()" and "transport_rewind()" methods. These are no-ops for HTTP, but might be useful for FILE and maybe even HTTPS. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/http.c from [de0b4f29e0] to [14fbdbab26].
@@ -167,10 +167,11 @@ */ transport_send(&hdr); transport_send(&payload); blob_reset(&hdr); blob_reset(&payload); + transport_flip(); /* ** Read and interpret the server reply */ closeConnection = 1; @@ -216,10 +217,12 @@ /* ** Close the connection to the server if appropriate. */ if( closeConnection ){ transport_close(); + }else{ + transport_rewind(); } return; /* ** Jump to here if an error is seen.
Modified src/http_transport.c from [e1307014ad] to [6002b9785d].
@@ -112,10 +112,30 @@ while( n>0 ){ sent = socket_send(0, z, n); if( sent<=0 ) break; n -= sent; } + } +} + +/* +** This routine is called when the outbound message is complete and +** it is time to being recieving a reply. +*/ +void transport_flip(void){ + if( g.urlIsFile ){ + /* run "fossil http" to process the outbound message */ + } +} + +/* +** This routine is called when the inbound message has been received +** and it is time to start sending again. +*/ +void transport_rewind(void){ + if( g.urlIsFile ){ + transport_close(); } } /* ** Read N bytes of content from the wire and store in the supplied buffer.