Start state transition verification + refactors

This commit is contained in:
Carl Lerche
2017-07-07 10:33:04 -07:00
parent a15f06ea7c
commit f6b6d0c7e8
16 changed files with 351 additions and 100 deletions

View File

@@ -102,15 +102,12 @@ impl Peer for Server {
type Send = http::response::Head;
type Poll = http::request::Head;
fn check_initiating_id(id: StreamId) -> Result<(), ConnectionError> {
if id % 2 == 1 {
// Server stream identifiers must be even
unimplemented!();
}
fn is_valid_local_stream_id(id: StreamId) -> bool {
id.is_server_initiated()
}
// TODO: Ensure the `id` doesn't overflow u31
Ok(())
fn is_valid_remote_stream_id(id: StreamId) -> bool {
id.is_client_initiated()
}
fn convert_send_message(