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

type overflow _bytesSent #191

Open
friackazoid opened this issue Aug 6, 2023 · 0 comments
Open

type overflow _bytesSent #191

friackazoid opened this issue Aug 6, 2023 · 0 comments

Comments

@friackazoid
Copy link

Hello, dear seasocks developers,

I have some questions regarding the variables _bytesSent and _bytesReceived (https://github.com/mattgodbolt/seasocks/blob/master/src/main/c/seasocks/Connection.h#L205).

As they are defined as size_t, these numbers are expected to increase during the program's lifetime. However, it is essential to consider that the size_t data type has a maximum value, which is implementation-dependent (https://en.cppreference.com/w/c/types/size_t). Although it can represent a large range of values, it still has some limitations.

I could not find any checks or resets of these variables in the code. Therefore, my question is whether you have any expectations or recommendations for handlers to reset the connection after some time to prevent potential overflow of the size_t data type in these variables.

I appreciate your guidance on this matter and look forward to your insights.

Thank you in advance.

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

No branches or pull requests

1 participant