From 51657e10769faa2617d546a06c42e4c62a19bb50 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 30 Jan 2022 17:41:24 +0100 Subject: Removed trailing whitespace all over the place --- NetEx/NetSock.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'NetEx/NetSock.cpp') diff --git a/NetEx/NetSock.cpp b/NetEx/NetSock.cpp index 0fb1081..06cbdcc 100644 --- a/NetEx/NetSock.cpp +++ b/NetEx/NetSock.cpp @@ -122,7 +122,7 @@ NetSock::accept(NetAddr* addr) if (addr) { sockaddr a; int asize = sizeof(a); - + conn = ::accept(s, &a, &asize); if (conn != INVALID_SOCKET && asize > 0) { @@ -140,19 +140,19 @@ NetSock::accept(NetAddr* addr) } // +--------------------------------------------------------------------+ - + int NetSock::available() { if (closed || s == INVALID_SOCKET) return 0; - + DWORD nbytes = 0; if (::ioctlsocket(s, FIONREAD, &nbytes) == 0) return (int) nbytes; return 0; } - + // +--------------------------------------------------------------------+ int @@ -279,7 +279,7 @@ NetSock::set_timeout(int msecs) { if (closed || s == INVALID_SOCKET) return 0; if (msecs == current_timeout) return 1; - + // zero timeout means non-blocking if (msecs == 0) { u_long nonblocking = 1; @@ -288,7 +288,7 @@ NetSock::set_timeout(int msecs) return stat; } } - + // non-zero timeout means blocking else { if (current_timeout == 0) { @@ -305,14 +305,14 @@ NetSock::set_timeout(int msecs) ::setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (char*) &maxto, sizeof(maxto)); ::setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, (char*) &maxto, sizeof(maxto)); } - + // otherwise, set the timeout else { ::setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (char*) &msecs, sizeof(msecs)); ::setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, (char*) &msecs, sizeof(msecs)); } } - + current_timeout = msecs; return 1; } -- cgit v1.1