mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
1. Add an enum type NetworkEventMessage for handling both HttpRequest and HttpResponse messages
2. Change run_server to handle network events 3. Add a unique id to track request-actor associations 4. Update the network event actor
This commit is contained in:
parent
9f4a88bc48
commit
6e91ebb1fe
5 changed files with 230 additions and 72 deletions
|
@ -47,8 +47,7 @@ pub enum DevtoolsControlMsg {
|
|||
NewGlobal((PipelineId, Option<WorkerId>), Sender<DevtoolScriptControlMsg>, DevtoolsPageInfo),
|
||||
SendConsoleMessage(PipelineId, ConsoleMessage),
|
||||
ServerExitMsg,
|
||||
HttpRequest(Url, Method, Headers, Option<Vec<u8>>),
|
||||
HttpResponse(Option<Headers>, RawStatus, Vec<u8>)
|
||||
NetworkEventMessage(String, NetworkEvent),
|
||||
}
|
||||
|
||||
/// Serialized JS return values
|
||||
|
@ -152,6 +151,12 @@ pub enum ConsoleMessage {
|
|||
//WarnMessage(String),
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum NetworkEvent {
|
||||
HttpRequest(Url, Method, Headers, Option<Vec<u8>>),
|
||||
HttpResponse(Option<Headers>, Option<RawStatus>, Option<Vec<u8>>)
|
||||
}
|
||||
|
||||
impl TimelineMarker {
|
||||
pub fn new(name: String, metadata: TracingMetadata) -> TimelineMarker {
|
||||
TimelineMarker {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue