Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 0d5198a

Browse files
committed
Update QuicFactory for QUIC SDK API change.
1 parent 365895e commit 0d5198a

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

source/agent/addons/quic/QuicFactory.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ std::once_flag getQuicFactoryOnce;
1515
std::shared_ptr<QuicFactory> QuicFactory::s_quicFactory = nullptr;
1616

1717
QuicFactory::QuicFactory()
18-
: m_quicTransportFactory(std::make_shared<owt::quic::QuicTransportFactory>())
18+
: m_quicTransportFactory(std::shared_ptr<owt::quic::QuicTransportFactory>(owt::quic::QuicTransportFactory::Create()))
1919
{
2020
ELOG_DEBUG("QuicFactory ctor.");
2121
}

source/agent/addons/quic/QuicTransportConnection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class QuicTransportConnection : public Nan::ObjectWrap, public owt::quic::QuicTr
4343
protected:
4444
// Overrides owt::quic::QuicTransportSessionInterface::Visitor.
4545
void OnIncomingStream(owt::quic::QuicTransportStreamInterface*) override;
46+
void OnCanCreateNewOutgoingStream(bool unidirectional) override { }
4647

4748
// Overrides QuicTransportStream::Visitor.
4849
void onEnded() override;

source/agent/addons/quic/QuicTransportStream.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ void QuicTransportStream::OnCanWrite()
5656
ELOG_DEBUG("On can write.");
5757
}
5858

59+
void QuicTransportStream::OnFinRead()
60+
{
61+
ELOG_DEBUG("On FIN read.");
62+
}
63+
5964
NAN_MODULE_INIT(QuicTransportStream::init)
6065
{
6166
Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(newInstance);

source/agent/addons/quic/QuicTransportStream.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class QuicTransportStream : public owt_base::FrameSource, public owt_base::Frame
5050
// Overrides owt::quic::QuicTransportStreamInterface::Visitor.
5151
void OnCanRead() override;
5252
void OnCanWrite() override;
53+
void OnFinRead() override;
5354

5455
private:
5556
// Try to read content session ID from data buffered.

source/agent/quic/webtransport/quicTransportServer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ module.exports = class QuicTransportServer extends EventEmitter {
3838
if (!connection.transportId) {
3939
connection.close();
4040
}
41-
}, authenticationTimeout * 1000);
41+
}, authenticationTimeout * 100000);
4242
connection.onincomingstream = (stream) => {
43+
log.info('New incoming stream.');
4344
stream.oncontentsessionid = (id) => {
4445
const streamId = this._uuidBytesToString(new Uint8Array(id))
4546
stream.contentSessionId = streamId;
4647
stream.transportId = connection.transportId;
4748
if (streamId === zeroUuid) {
4849
// Signaling stream. Waiting for transport ID.
50+
log.info('Zero content session ID.');
4951
} else if (!connection.transportId) {
5052
log.error(
5153
'Stream ' + streamId +
@@ -60,6 +62,7 @@ module.exports = class QuicTransportServer extends EventEmitter {
6062
stream.ondata = (data) => {
6163
if (stream.contentSessionId === zeroUuid) {
6264
const transportId = data.toString('utf8');
65+
log.info('Received new transport ID: '+transportId);
6366
if (!this._assignedTransportIds.includes(transportId)) {
6467
log.info(JSON.stringify(connection));
6568
connection.close();

0 commit comments

Comments
 (0)