summaryrefslogtreecommitdiff
path: root/src/network/core/udp.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-11 13:39:23 +0000
committerrubidium <rubidium@openttd.org>2007-02-11 13:39:23 +0000
commitb71d6e14013d237feeb69367a0e978c7622a813b (patch)
tree396536898aae8bab69b1c6d42853c3e4bc99184d /src/network/core/udp.cpp
parent7ee3fc4979645065a6ec580c7bdbdd656e3b1090 (diff)
downloadopenttd-b71d6e14013d237feeb69367a0e978c7622a813b.tar.xz
(svn r8673) -Codechange: use SetNonBlocking instead of implementing yet another version.
Diffstat (limited to 'src/network/core/udp.cpp')
-rw-r--r--src/network/core/udp.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index cc83577ef..45ed287c1 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -33,15 +33,7 @@ bool NetworkUDPSocketHandler::Listen(const uint32 host, const uint16 port, const
return false;
}
- /* set nonblocking mode for socket */
- {
- unsigned long blocking = 1;
-#ifndef BEOS_NET_SERVER
- ioctlsocket(this->sock, FIONBIO, &blocking);
-#else
- setsockopt(this->sock, SOL_SOCKET, SO_NONBLOCK, &blocking, NULL);
-#endif
- }
+ SetNonBlocking(this->sock);
sin.sin_family = AF_INET;
/* Listen on all IPs */