Bug 1734132 - Add neqo glue code to send priority updates r=necko-reviewers,dragana

Differential Revision: https://phabricator.services.mozilla.com/D129003
This commit is contained in:
Manuel Bucher 2021-11-16 17:01:06 +00:00
parent 6edbd3270e
commit 52ae51abfa
2 changed files with 23 additions and 0 deletions

View File

@ -62,6 +62,12 @@ class NeqoHttp3Conn final {
&aHeaders, aStreamId, aUrgency, aIncremental);
}
nsresult PriorityUpdate(uint64_t aStreamId, uint8_t aUrgency,
bool aIncremental) {
return neqo_http3conn_priority_update(this, aStreamId, aUrgency,
aIncremental);
}
nsresult SendRequestBody(uint64_t aStreamId, const uint8_t* aBuf,
uint32_t aCount, uint32_t* aCountRead) {
return neqo_htttp3conn_send_request_body(this, aStreamId, aBuf, aCount,

View File

@ -410,6 +410,23 @@ pub extern "C" fn neqo_http3conn_fetch(
}
}
#[no_mangle]
pub extern "C" fn neqo_http3conn_priority_update(
conn: &mut NeqoHttp3Conn,
stream_id: u64,
urgency: u8,
incremental: bool,
) -> nsresult {
if urgency >= 8 {
return NS_ERROR_INVALID_ARG;
}
let priority = Priority::new(urgency, incremental);
match conn.conn.priority_update(stream_id, priority) {
Ok(_) => NS_OK,
Err(_) => NS_ERROR_UNEXPECTED,
}
}
#[no_mangle]
pub extern "C" fn neqo_htttp3conn_send_request_body(
conn: &mut NeqoHttp3Conn,