feat: migrate protocol module to NetworkService (Part 4) (#18084)
* Parse stream protocol handler * Pipe node stream to mojo * Merge the parser for headers * Add ToDict helper to simplify code * Simplify dispatching logic * Add an experimental API for returning any type of response * Fix subscribing event * URL loaders' lifetime is independent of the factory * HandleError helper is no longer needed * Rename "SendResponse" => "StartLoading" to follow naming conventions * Delete when connection error happens * Fix cpplint warning
This commit is contained in:
parent
cc00fa8874
commit
0a6eb8afca
6 changed files with 453 additions and 169 deletions
|
@ -119,6 +119,8 @@ void ProtocolNS::BuildPrototype(v8::Isolate* isolate,
|
|||
&ProtocolNS::RegisterProtocolFor<ProtocolType::kHttp>)
|
||||
.SetMethod("registerStreamProtocol",
|
||||
&ProtocolNS::RegisterProtocolFor<ProtocolType::kStream>)
|
||||
.SetMethod("registerProtocol",
|
||||
&ProtocolNS::RegisterProtocolFor<ProtocolType::kFree>)
|
||||
.SetMethod("unregisterProtocol", &ProtocolNS::UnregisterProtocol)
|
||||
.SetMethod("isProtocolRegistered", &ProtocolNS::IsProtocolRegistered)
|
||||
.SetMethod("isProtocolHandled", &ProtocolNS::IsProtocolHandled)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue