Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7e31db432af6660328dbd717aec83d0ac211e115
https://github.com/WebKit/WebKit/commit/7e31db432af6660328dbd717aec83d0ac211e115
Author: Alex Christensen <[email protected]>
Date: 2024-08-29 (Thu, 29 Aug 2024)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/webtransport/back-forward-cache-with-closed-webtransport-connection.https.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webtransport/back-forward-cache-with-open-webtransport-connection.https.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webtransport/constructor.https.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webtransport/csp-fail.https.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webtransport/csp-pass.https.window-expected.txt
M Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
M Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp
M Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h
A
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/SourcesCocoa.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm
A Tools/TestWebKitAPI/WebTransportServer.h
A Tools/TestWebKitAPI/WebTransportServer.mm
M Tools/TestWebKitAPI/cocoa/HTTPServer.h
A Tools/TestWebKitAPI/cocoa/WebTransportServer.h
A Tools/TestWebKitAPI/cocoa/WebTransportServer.mm
Log Message:
-----------
Begin implementing WebTransport network interface
https://bugs.webkit.org/show_bug.cgi?id=278891
rdar://134977323
Reviewed by Matthew Finkel.
As a first step, I start implementing the connection initialization and data
sending
using h2 instead of the WebTransport protocol. They are similar enough that
they
both benefit from using the nw_connection_group_t abstraction which is an object
that can be initialized with a URL, start or receive "connections" and send or
receive
data. nw_connection_group_set_receive_handler needs to be called before
nw_connection_group_start so I create a NetworkTransportSession for the receive
handler
before deciding if we want to discard it by calling the completion handler of
NetworkTransportSession::initialize with nullptr if there is a network failure
during
initialization. Other than that, this PR basically just adds some
straightforward
abstractions and begins implementing a few of them.
WebTransport has some special needs on the server, so I made a new test server
for it.
httpd doesn't really support it in a straightforward way, and even WPT's
WebTransport
tests require a little custom server setup. TestWebKitAPI::HTTPServer isn't
really
the right abstraction for it, either because I will eventually need to use
nw_listener_set_new_connection_group_handler instead of
nw_listener_set_new_connection_handler
to listen for quic connections. It isn't quite the way it needs to be yet, but
I just listen for one encrypted TCP connection and wait until it receives more
than 0 bytes,
which verifies that something is happening on the client. In my next PR I'll
hook up more
things and soon I'll start using nw_connection_group_t on the server too.
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp:
(WebKit::NetworkTransportSession::initialize):
(WebKit::NetworkTransportSession::messageSenderConnection const):
(WebKit::NetworkTransportSession::sendDatagram):
(WebKit::NetworkTransportSession::createOutgoingUnidirectionalStream):
(WebKit::NetworkTransportSession::createBidirectionalStream):
(WebKit::NetworkTransportSession::receiveDatagram):
(WebKit::NetworkTransportSession::NetworkTransportSession): Deleted.
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h:
*
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm:
Added.
(WebKit::NetworkTransportSession::NetworkTransportSession):
(WebKit::NetworkTransportSession::initialize):
(WebKit::NetworkTransportSession::sendDatagram):
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm: Added.
(TestWebKitAPI::enableWebTransport):
(TestWebKitAPI::TEST(WebTransport, Basic)):
* Tools/TestWebKitAPI/WebTransportServer.h: Added.
(TestWebKitAPI::WebTransportServer::bytesReceived const):
(TestWebKitAPI::WebTransportServer::setBytesReceived):
* Tools/TestWebKitAPI/WebTransportServer.mm: Added.
(TestWebKitAPI::connectionLoop):
(TestWebKitAPI::WebTransportServer::WebTransportServer):
(TestWebKitAPI::WebTransportServer::port const):
* Tools/TestWebKitAPI/cocoa/HTTPServer.h:
* Tools/TestWebKitAPI/cocoa/WebTransportServer.h: Added.
* Tools/TestWebKitAPI/cocoa/WebTransportServer.mm: Added.
Canonical link: https://commits.webkit.org/282945@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes