<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for the feedback.  I haven't gotten to that level of analysis
yet, because I was more focused on a nice working solution up front,
but will start digging deeper.  Really however, the call to Sleep() is
just an added bonus.  The fix works fine without it, you just get some
frame rate drop whenever the client is acting up (I have a quad core,
so I don't know what the impact is for dual or single core users).  I
would be happy to leave it out if we could get a fix in the wine
mainline for now while digging deeper into what's causing it.<br>
<br>
The main problem is the production of thousands of small and identical
udp packets essentially causing a DoS attack on their server and
bogging down the upstream traffic for the user.  In one test, 8500x 62
byte packets (size includes headers) were sent in 500 mS.  Some users
have also reported problems where their routers don't seem to handle
the flood very well (crashing, etc.).  It's an intermittent problem and
only occurs while one's character is in specific locations in the game
world.  I'm also not certain that every Linux user experiences this
problem and the degree will certainly vary depending upon their
bandwidth.<br>
<br>
Rob Shearman wrote:
<blockquote
 cite="mid:1096648c0807160545l514db14esaf2b13d9c3b5da68@mail.gmail.com"
 type="cite">
  <pre wrap="">2008/7/16 Daniel Santos <a class="moz-txt-link-rfc2396E" href="mailto:daniel@bytesage.com">&lt;daniel@bytesage.com&gt;</a>:
  </pre>
  <blockquote type="cite">
    <pre wrap="">+    if(_lotro_hack_enabled
+            &amp;&amp; to-&gt;sa_family == AF_INET
+            &amp;&amp; dwBufferCount == 1
+            &amp;&amp; _lotro_hack(&amp;get_per_thread_data()-&gt;lotro_msgs,
+                    s, lpBuffers, (struct WS_sockaddr_in*)to)) {
+        Sleep(10);
+        if(lpNumberOfBytesSent) {
+            *lpNumberOfBytesSent = lpBuffers-&gt;len;
+        }
+        return 0;
+    }
+
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Hi Daniel,

While I appreciate the effort you've gone to to fix a bug, I don't see
any analysis in the bug that suggests this is the only possible
solution. It seems to me as though LOTRO is calling WSASendTo in a
tight loop and that it isn't such a tight loop on Windows. A +relay
log will reveal which calls it is making in that thread. You can then
build a similar test program and time how long each call takes on
Windows and Wine and see where the difference is (although it probably
won't be as simple as that as there will be other threads interacting
in LOTRO). At a guess, it might simply be that Windows yields to other
threads after making a call to a network function.

  </pre>
</blockquote>
<br>
</body>
</html>