]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/listener.cpp
WaitPackets moved to common.lib
[stg.git] / projects / rscriptd / listener.cpp
index 39e590b6980567d20a00d0c0de263e3266a66f99..9e03988c2f116cd9e8283b372c49afe3f9a6beb1 100644 (file)
@@ -456,34 +456,6 @@ if (strncmp((char *)header.protoVer, "02", RS_PROTO_VER_LEN))
 return false;
 }
 //-----------------------------------------------------------------------------
-bool LISTENER::WaitPackets(int sd) const
-{
-fd_set rfds;
-FD_ZERO(&rfds);
-FD_SET(sd, &rfds);
-
-struct timeval tv;
-tv.tv_sec = 0;
-tv.tv_usec = 500000;
-
-int res = select(sd + 1, &rfds, NULL, NULL, &tv);
-if (res == -1) // Error
-    {
-    if (errno != EINTR)
-        {
-        printfd(__FILE__, "Error on select: '%s'\n", strerror(errno));
-        }
-    return false;
-    }
-
-if (res == 0) // Timeout
-    {
-    return false;
-    }
-
-return true;
-}
-//-----------------------------------------------------------------------------
 inline
 void InitEncrypt(BLOWFISH_CTX * ctx, const std::string & password)
 {