-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3e02bb
commit 49bc41e
Showing
6 changed files
with
326 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
body { | ||
font-family: sans-serif; | ||
} | ||
|
||
h1 { | ||
margin: 0 auto; | ||
width: fit-content; | ||
} | ||
|
||
h2 { | ||
border-bottom: 1px dotted #333; | ||
font-size: 120%; | ||
font-weight: normal; | ||
padding-bottom: 0.2em; | ||
padding-top: 0.5em; | ||
} | ||
|
||
code { | ||
background-color: #eee; | ||
} | ||
|
||
input[type=text], textarea { | ||
font-family: monospace; | ||
} | ||
|
||
#top { | ||
display: flex; | ||
flex-direction: row-reverse; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
} | ||
|
||
#explanation { | ||
border: 1px dotted black; | ||
font-size: 90%; | ||
height: fit-content; | ||
margin-bottom: 1em; | ||
padding: 1em; | ||
width: 13em; | ||
} | ||
|
||
#tool { | ||
flex-grow: 1; | ||
margin: 0 auto; | ||
max-width: 26em; | ||
padding: 0 1em; | ||
width: 26em; | ||
} | ||
|
||
.input-line { | ||
display: flex; | ||
} | ||
|
||
.input-line input[type=text] { | ||
flex-grow: 1; | ||
margin: 0 0.5em; | ||
} | ||
|
||
textarea { | ||
height: 3em; | ||
width: 100%; | ||
} | ||
|
||
#send { | ||
margin-top: 0.5em; | ||
width: 15em; | ||
} | ||
|
||
#event-log { | ||
border: 1px dotted black; | ||
font-family: monospace; | ||
height: 12em; | ||
overflow: scroll; | ||
padding-bottom: 1em; | ||
padding-top: 1em; | ||
} | ||
|
||
.log-error { | ||
color: darkred; | ||
} | ||
|
||
#explanation ul { | ||
padding-left: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<title>WebTransport over HTTP/3 client</title> | ||
<meta charset="utf-8"> | ||
<!-- WebTransport origin trial token. See https://developer.chrome.com/origintrials/#/view_trial/793759434324049921 --> | ||
<meta http-equiv="origin-trial" content="AkSQvBVsfMTgBtlakApX94hWGyBPQJXerRc2Aq8g/sKTMF+yG62+bFUB2yIxaK1furrNH3KNNeJV00UZSZHicw4AAABceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZWNocm9tZS5naXRodWIuaW86NDQzIiwiZmVhdHVyZSI6IldlYlRyYW5zcG9ydCIsImV4cGlyeSI6MTY0Mzc1OTk5OX0="> | ||
<script src="client.js"></script> | ||
<link rel="stylesheet" href="client.css"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<body> | ||
<div id="top"> | ||
<div id="explanation"> | ||
This tool can be used to connect to an arbitrary WebTransport server. | ||
It has several limitations: | ||
<ul> | ||
<li>It can only send an entirety of a stream at once. Once the stream | ||
is opened, all of the data is immediately sent, and the write side of | ||
the steam is closed.</li> | ||
<li>This tool does not listen to server-initiated bidirectional | ||
streams.</li> | ||
<li>Stream IDs are different from the one used by QUIC on the wire, as | ||
the on-the-wire IDs are not exposed via the Web API.</li> | ||
<li>The <code>WebTransport</code> object can be accessed using the developer console via <code>currentTransport</code>.</li> | ||
</ul> | ||
</div> | ||
<div id="tool"> | ||
<h1>WebTransport over HTTP/3 client</h1> | ||
<div> | ||
<h2>Establish WebTransport connection</h2> | ||
<div class="input-line"> | ||
<label for="url">URL:</label> | ||
<input type="text" name="url" id="url" | ||
value="https://127.0.0.1:5800/counter"> | ||
<input type="button" id="connect" value="Connect" onclick="connect()"> | ||
</div> | ||
</div> | ||
<div> | ||
<h2>Send data over WebTransport</h2> | ||
<form name="sending"> | ||
<textarea name="data" id="data"></textarea> | ||
<div> | ||
<input type="radio" name="sendtype" value="datagram" | ||
id="datagram" checked> | ||
<label for="datagram">Send a datagram</label> | ||
</div> | ||
<div> | ||
<input type="radio" name="sendtype" value="unidi" id="unidi-stream"> | ||
<label for="unidi-stream">Open a unidirectional stream</label> | ||
</div> | ||
<div> | ||
<input type="radio" name="sendtype" value="bidi" id="bidi-stream"> | ||
<label for="bidi-stream">Open a bidirectional stream</label> | ||
</div> | ||
<input type="button" id="send" name="send" value="Send data" | ||
disabled onclick="sendData()"> | ||
</form> | ||
</div> | ||
<div> | ||
<h2>Event log</h2> | ||
<ul id="event-log"> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.