-
Notifications
You must be signed in to change notification settings - Fork 320
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
Shorten Stats String Lengths #2079
Conversation
NullableUint16 maxRetransmits; //!< Control number of times a channel retransmits data if not delivered successfully | ||
CHAR protocol[MAX_PROTOCOL_LENGTH + 1]; //!< Sub protocol name for the channel | ||
BOOL negotiated; //!< If set to true, it is up to the application to negotiate the channel and create an | ||
//!< RTCDataChannel object with the same id as the other peer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for later. I noticed that the data channel init struct doesn't have a label
member. It seems it's actually called "name" and instead, passed into the createDataChannel() method which takes in this struct + a few additional params one of them is this name
.
INT32 port; //!< Port number of the candidate | ||
DOMString candidateType; //!< Type of local/remote ICE candidate | ||
DOMString url; //!< For local candidates this is the URL of the ICE server from which the candidate was obtained | ||
CHAR address[KVS_IP_ADDRESS_STRING_BUFFER_LEN]; //!< IPv4 or IPv6 address of the candidate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to transportId
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those were removed from two structs in the original PR, likely to save memory as they are not used anywhere.
https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/pull/1947/files
INT32 port; //!< Port number of the candidate | ||
DOMString candidateType; //!< Type of local/remote ICE candidate | ||
DOMString url; //!< For local candidates this is the URL of the ICE server from which the candidate was obtained | ||
CHAR address[KVS_IP_ADDRESS_STRING_BUFFER_LEN]; //!< IPv4 or IPv6 address of the candidate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw IP_ADDR_STR_LENGTH + 1
in another part of this PR, is this storing something different? The comment is the same as in RtcIceCandidateStats
.
Since these strings use a lot of the same types, suggest to add and use typedefs for these char arrays with optimized lengths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither IP_ADDR_STR_LENGTH
nor KVS_IP_ADDRESS_STRING_BUFFER_LEN
were modified or used differently in this PR. Will leave this comment unresolved for visibility for future improvements.
Issue #, if available:
What was changed?
Why was it changed?
char[length]
.How was it changed?
What testing was done for the changes?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.