提交 fe95a1c2 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Make transport.setRemoteDtlsParameters() to resolve with transport itself.

上级 c7ea0bed
......@@ -163,6 +163,10 @@ class Transport extends EventEmitter
// Take the .role field of the response data and append it to our
// this._data.dtlsLocalParameters
this._data.dtlsLocalParameters.role = data.role;
// Return the transport itself so the user can handle it in the next
// `then()` level`
return this;
})
.catch((error) =>
{
......@@ -203,6 +207,7 @@ class Transport extends EventEmitter
// transport
this.emit('associatedtransport', transport);
// Return the new transport
return transport;
})
.catch((error) =>
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论