Skip to content

Optimize memory usage when sending data on Windows #359

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

an-tao
Copy link
Owner

@an-tao an-tao commented Oct 11, 2024

No description provided.

@an-tao an-tao requested review from marty1885 and hwc0919 October 11, 2024 10:26
Comment on lines 746 to +751
#ifndef _WIN32
ssize_t TcpConnectionImpl::writeRaw(const void *buffer, size_t length)
#else
static int sendDataWin(int fd, const char *buffer, int length, int sendBufSize)
{
int n = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ifndef is really confusing for no good reason. The function deceleration ssize_t TcpConnectionImpl::writeRaw(const void *buffer, size_t length) is also repeated once at the end of the else clause. We should clean this up.

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

Successfully merging this pull request may close these issues.

2 participants