Skip to content

Commit

Permalink
fix: oversight on renaming variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Mar 6, 2024
1 parent 758c2ac commit d525da3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion webrtc/datachannel.nim
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ proc new*(_: type DataChannelConnection, conn: SctpConn): DataChannelConnection
incomingStreams: newAsyncQueue[DataChannelStream](),
streamId: 1'u16 # TODO: Serveur == 1, client == 2
)
conn.readLoopFut = conn.readLoop()
result.readLoopFut = result.readLoop()
10 changes: 5 additions & 5 deletions webrtc/webrtc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ type
proc new*(T: typedesc[WebRTC], address: TransportAddress): T =
result = T(udp: UdpConn(), stun: StunConn(), dtls: Dtls(), sctp: Sctp())
result.udp.init(address)
result.stun.init(webrtc.udp, address)
result.dtls.init(webrtc.stun, address)
result.sctp.init(webrtc.dtls, address)
result.stun.init(result.udp, address)
result.dtls.init(result.stun, address)
result.sctp.init(result.dtls, address)

proc listen*(self: WebRTC) =
self.sctp.listen()

proc connect*(self: WebRTC): Future[DataChannelConnection] {.async.} =
let sctpConn = await self.sctp.connect()
proc connect*(self: WebRTC, raddr: TransportAddress): Future[DataChannelConnection] {.async.} =
let sctpConn = await self.sctp.connect(raddr) # TODO: Port?
result = DataChannelConnection.new(sctpConn)

proc accept*(w: WebRTC): Future[DataChannelConnection] {.async.} =
Expand Down

0 comments on commit d525da3

Please sign in to comment.