Skip to content

Commit

Permalink
chore: remove comments & exposition
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Sep 12, 2024
1 parent 21e0cfe commit 185642b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions webrtc/sctp/sctp_connection.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ logScope:

const SctpConnTracker* = "webrtc.sctp.conn"

# TODO: closing connection if usrsctp_recv / usrsctp_read fails
type
SctpConnOnClose* = proc() {.raises: [], gcsafe.}

Expand Down Expand Up @@ -52,7 +51,7 @@ proc remoteAddress*(self: SctpConn): TransportAddress =
raise newException(WebRtcError, "SCTP - Connection not set")
return self.conn.remoteAddress()

template usrsctpAwait*(self: SctpConn, body: untyped): untyped =
template usrsctpAwait(self: SctpConn, body: untyped): untyped =
# usrsctpAwait is template which set `sendQueue` to @[] then calls
# an usrsctp function. If during the synchronous run of the usrsctp function
# `sendQueue` is set, it is sent at the end of the function.
Expand Down Expand Up @@ -105,7 +104,6 @@ proc recvCallback*(sock: ptr socket, data: pointer, flags: cint) {.cdecl.} =
)
if n < 0:
trace "usrsctp_recvv", error = sctpStrerror()
# TODO: should close
return
elif n > 0:
# It might be necessary to check if infotype == SCTP_RECVV_RCVINFO
Expand Down
2 changes: 1 addition & 1 deletion webrtc/sctp/sctp_transport.nim
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Sctp* = ref object
dtls: Dtls # Underlying Dtls Transport
connections: Table[TransportAddress, SctpConn] # List of all the Sctp connections
isServer: bool
sockServer: ptr socket # usrsctp socket to accept new connections
sockServer: ptr socket # usrsctp "server" socket to accept new connections

# -- usrsctp accept and connect callbacks --

Expand Down

0 comments on commit 185642b

Please sign in to comment.