Skip to content

Commit

Permalink
ggsock : fixes for windows (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
guilt committed Jul 21, 2023
1 parent 8f024e4 commit 25ea970
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 25ea970

Please sign in to comment.