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

ggsock : fixes for windows #1

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ namespace GGSock {

while (leftToReceive > 0) {
//printf("left = %d\n", (int) leftToReceive);
size_t curSize = std::min(65536, (int) leftToReceive);
size_t curSize = (std::min)(65536, (int) leftToReceive);

int rc = (int) recv(sdpeer, bufferDataRecv.data() + offsetReceive, curSize, 0);
if (rc < 0) {
Expand Down Expand Up @@ -544,7 +544,7 @@ namespace GGSock {
data.isServer = true;
data.isListening = true;

data.timeoutListen_ms = std::max(0, timeout_ms);
data.timeoutListen_ms = (std::max)(0, timeout_ms);
if (timeout_ms > 0) {
bool success = data.doListen();

Expand Down Expand Up @@ -620,7 +620,7 @@ namespace GGSock {
data.isServer = false;
data.isConnecting = true;

data.timeoutConnect_ms = std::max(0, timeout_ms);
data.timeoutConnect_ms = (std::max)(0, timeout_ms);
if (timeout_ms > 0) {
bool res = data.doConnect();

Expand Down