WIP: get http load test into better (but bad) state

Is now able to maintain correspondence with aquatic_http
and opentracker
This commit is contained in:
Joakim Frostegård 2020-08-02 06:38:36 +02:00
parent 9707898a32
commit cb3ec8cbf1
6 changed files with 89 additions and 44 deletions

View file

@ -45,6 +45,17 @@ impl EstablishedConnection {
}
}
pub fn shutdown(&mut self){
match self.stream {
Stream::TcpStream(ref mut s) => {
s.shutdown(::std::net::Shutdown::Both);
},
Stream::TlsStream(ref mut s) => {
s.shutdown();
},
}
}
pub fn read_request(&mut self) -> Result<Request, RequestReadError> {
if (self.buf.len() - self.bytes_read < 512) & (self.buf.len() <= 3072){
self.buf.extend_from_slice(&[0; 1024]);