Open
Bug 1821566
Opened 3 years ago
Updated 3 years ago
Can't send datagrams of exactly the maxDatagramSize in WebTransport
Categories
(Core :: Networking: HTTP, defect, P2)
Core
Networking: HTTP
Tracking
()
NEW
People
(Reporter: jesup, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
If I send 1200 byte datagrams, I get a closed on the WebTransport:
0:18.70 pid:1244701 2023-03-10 01:53:24.897007 UTC - [Child 1244961: DOM Worker]: D/WebTransport Sending Datagram, size = 1200
0:18.70 pid:1244701 2023-03-10 01:53:24.897053 UTC - [Parent 1244701: Socket Thread]: D/WebTransport WebTransportParent sending datagram
0:18.70 pid:1244701 2023-03-10 01:53:24.897056 UTC - [Parent 1244701: Socket Thread]: V/WebTransport Sending datagram 8, length 1200
0:18.70 pid:1244701 2023-03-10 01:53:24.897058 UTC - [Parent 1244701: Socket Thread]: D/nsWebTransport Sending datagram id=8
0:18.70 pid:1244701 2023-03-10 01:53:24.897062 UTC - [Parent 1244701: Socket Thread]: D/WebTransport Sent datagram id= 8
0:18.70 pid:1244701 2023-03-10 01:53:24.897066 UTC - [Child 1244961: DOM Worker]: V/WebTransport NewBidirectionalStream()
0:18.70 pid:1244701 2023-03-10 01:53:24.897070 UTC - [Child 1244961: DOM Worker]: D/WebTransport NotifyIncomingStream
0:18.70 pid:1244701 2023-03-10 01:53:24.897073 UTC - [Child 1244961: DOM Worker]: D/WebTransport NotifyIncomingStream: 1 Bidirectional
0:18.70 pid:1244701 2023-03-10 01:53:24.897098 UTC - [Child 1244961: DOM Worker]: D/WebTransport Datagram was sent
0:18.70 pid:1244701 2023-03-10 01:53:24.897121 UTC - [Child 1244961: DOM Worker]: D/WebTransport Datagrams Pull waiting for a datagram
0:18.70 pid:1244701 2023-03-10 01:53:24.897394 UTC - [Parent 1244701: Socket Thread]: D/nsWebTransport WebTransportSessionProxy::OnSessionClosed 7f57f228f340 mState=3 mStopRequestCalled=1
0:18.70 pid:1244701 2023-03-10 01:53:24.897399 UTC - [Parent 1244701: Socket Thread]: D/nsWebTransport WebTransportSessionProxy::ChangeState 3 -> 4 [this=7f57f228f340]
0:18.70 pid:1244701 2023-03-10 01:53:24.897402 UTC - [Parent 1244701: Socket Thread]: D/nsWebTransport WebTransportSessionProxy::ChangeState 4 -> 6 [this=7f57f228f340]
| Reporter | ||
Comment 1•3 years ago
|
||
Added this test to datagrams:
promise_test(async t => {
// Establish a WebTransport session.
const wt = new WebTransport(webtransport_url('echo.py'));
await wt.ready;
wt.closed.then(() => dump("******* closed\n"));
const writer = wt.datagrams.writable.getWriter();
const reader = wt.datagrams.readable.getReader();
// Write and read max-size datagram.
await writer.write(new Uint8Array(wt.datagrams.maxDatagramSize));
const { value: token, done } = await reader.read();
dump("*** length = " + token.length + " : " + wt.datagrams.maxDatagramSize + "\n");
assert_equals(token.length, wt.datagrams.maxDatagramSize);
dump("*** pass\n");
}, 'Transfer max-size datagrams');
| Reporter | ||
Comment 2•3 years ago
|
||
The real issue is that the pref for datagram size isn't the payload, it's the raw datagram data packet size; we need to get the actual max payload size from the stack and feed that over to content.
You need to log in
before you can comment on or make changes to this bug.
Description
•