fix: oversight on renaming variable

This commit is contained in:
Ludovic Chenut 2024-03-06 16:47:39 +01:00
parent 758c2ac4ae
commit d525da3d62
No known key found for this signature in database
GPG Key ID: D9A59B1907F1D50C
2 changed files with 6 additions and 6 deletions

View File

@ -224,4 +224,4 @@ proc new*(_: type DataChannelConnection, conn: SctpConn): DataChannelConnection
incomingStreams: newAsyncQueue[DataChannelStream](), incomingStreams: newAsyncQueue[DataChannelStream](),
streamId: 1'u16 # TODO: Serveur == 1, client == 2 streamId: 1'u16 # TODO: Serveur == 1, client == 2
) )
conn.readLoopFut = conn.readLoop() result.readLoopFut = result.readLoop()

View File

@ -28,15 +28,15 @@ type
proc new*(T: typedesc[WebRTC], address: TransportAddress): T = proc new*(T: typedesc[WebRTC], address: TransportAddress): T =
result = T(udp: UdpConn(), stun: StunConn(), dtls: Dtls(), sctp: Sctp()) result = T(udp: UdpConn(), stun: StunConn(), dtls: Dtls(), sctp: Sctp())
result.udp.init(address) result.udp.init(address)
result.stun.init(webrtc.udp, address) result.stun.init(result.udp, address)
result.dtls.init(webrtc.stun, address) result.dtls.init(result.stun, address)
result.sctp.init(webrtc.dtls, address) result.sctp.init(result.dtls, address)
proc listen*(self: WebRTC) = proc listen*(self: WebRTC) =
self.sctp.listen() self.sctp.listen()
proc connect*(self: WebRTC): Future[DataChannelConnection] {.async.} = proc connect*(self: WebRTC, raddr: TransportAddress): Future[DataChannelConnection] {.async.} =
let sctpConn = await self.sctp.connect() let sctpConn = await self.sctp.connect(raddr) # TODO: Port?
result = DataChannelConnection.new(sctpConn) result = DataChannelConnection.new(sctpConn)
proc accept*(w: WebRTC): Future[DataChannelConnection] {.async.} = proc accept*(w: WebRTC): Future[DataChannelConnection] {.async.} =