Close
Showing results 1 to 10 of 83

Hybrid View

  1. #1

    Default

    Quote Originally Posted by Moorea View Post
    This being said, more seriously/interestingly, why do you need 2 sockets - a socket is bi directional; so you should only need either of the machine to connect to the other; not both
    Because I discovered through testing that Windows sockets are capable of making more transmissions per second in one direction than the other. Winsock connections aren't symmetrical in terms of performance.
    �Author of HotkeyNet and Mojo

  2. #2

    Default

    Quote Originally Posted by Freddie View Post
    Because I discovered through testing that Windows sockets are capable of making more transmissions per second in one direction than the other. Winsock connections aren't symmetrical in terms of performance.
    IC, Are you sure it's direction issue ? I think what you may have found is you get more throughput using 2 sockets than using 1 (for the same latency, and depending on stack tuning) but the direction itself shouldn't(*) matter - is the difference really noticeable ? Maybe you can fallback to using 1 socket if somehow you can't get the second one ? (though that may make your code more complicated) - I guess sending all IPs would probably work)


    *: I know TCP/IP pretty well; admittedly I have no clue about windows specifics though so I don't know how the folks in redmond may have botched it up so I guess anything is possible...
    2,3,5 boxing wow with Wow Open Box and MAMA, give them a try!
    (was 8 Boxing Wow with HotKeyNet and ISBoxer)
    Was streaming on twitch.tv/MooreaTv

  3. #3

    Default

    Quote Originally Posted by Moorea View Post
    IC, Are you sure it's direction issue ?
    Yes.

    I think what you may have found is you get more throughput using 2 sockets than using 1
    No, because only one connection is used at a time.

    is the difference really noticeable ?
    Yes, it's quite noticeable during mouseover. That's the only time that Mojo (or HotkeyNet 2 where I first noticed this) tries to make many transmissions per second on the same connection. Cursor motion on the remote is noticeably snappier (a higher FPS rate, so to speak) when the socket connection is used in the preferred direction.

    Maybe you can fallback to using 1 socket if somehow you can't get the second one ? (
    When the program is mature and fully debugged, at that future time, I'll do that. But if I do it now, it will only conceal problems.

    I want the problems to be seen and reported to me so I can fix them.

    I guess sending all IPs would probably work)
    I thought you said that picking different IP addresses from the drop down list didn't fix the problem (or it half solved the problem but not completely). All the IP addresses are on that list. If picking them from the list didn't fix the problem, then sending them automatically won't fix it either.

    In any case, this idea would have some bad effects because normally, on most computers, all the IPs would connect and Mojo would end up with many (possibly many dozens) of socket connections between every pair of computers. If you have two PCs and each one has four interfaces, you'd end up with 4 x 4 x 2 = 32 socket connections. During mouseover, every time you moved the mouse, the local PC would send 16 different TCP packets instead of just one. The receiving Mojo would receive every communication multiple times on every one of its adapters. I would have to add serial numbers to the messages so the receiving Mojo could throw away the duplicates.

    To avoid this, I would have to add complicated code to Mojo to audit the number of connections and prune them.

    *: I know TCP/IP pretty well; admittedly I have no clue about windows specifics though so I don't know how the folks in redmond may have botched it up so I guess anything is possible...
    I don't think this asymmetry is particularly surprising, and I don't think it means that Microsoft botched anything.

    There are always limits to peformance because performance can't ever be infinite. Even the speed of light is finite.

    All this proves is that the code for the client end and server end of sockets isn't exactly the same. Since it's not exactly the same it has different maximum performance limits.

    By the way, I only tested this on XP and Vista. It may be different in Win 7. For all I know, the situation is reversed in Win 7.
    Last edited by Freddie : 01-26-2010 at 05:32 AM
    �Author of HotkeyNet and Mojo

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •