fix: oversight on renaming variable
This commit is contained in:
parent
758c2ac4ae
commit
d525da3d62
|
@ -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()
|
||||||
|
|
|
@ -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.} =
|
||||||
|
|
Loading…
Reference in New Issue