Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About using [] in the addRemote call #1371

Closed
mwelzl opened this issue Sep 18, 2023 · 2 comments
Closed

About using [] in the addRemote call #1371

mwelzl opened this issue Sep 18, 2023 · 2 comments

Comments

@mwelzl
Copy link
Contributor

mwelzl commented Sep 18, 2023

From the review by Paul Wouters, COMMENT part:

   Preconnection.AddRemote(RemoteCandidates)

Should this not technically be:

       Preconnection.AddRemote([]RemoteCandidates)

as the array contains at least a host and a stun server candidate?

Maybe this is just the difference between you using the variable you define
that has been assigned, versus a more C like prototype format, eg:

       Preconnection := NewPreconnection([]LocalEndpoint,

So I guess if your example here had set LocalEndpoint := [a,b] you would not
have used [] in the call ?

@mwelzl
Copy link
Contributor Author

mwelzl commented Oct 17, 2023

We think (interim) that this may be right: the brackets might be needed?

@tfpauly
Copy link
Contributor

tfpauly commented Nov 8, 2023

The problem is that RemoteCandidates is only defined in a comment and its type is not clear. Perhaps declare it in the code with a type with []RemoteEndpoint, and then comment that it gets filled out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants