VirtualBox

Ignore:
Timestamp:
Nov 13, 2008 6:30:22 AM (16 years ago)
Author:
vboxsync
Message:

registration several sockets per event, to avoid artificial barrier with
WSA_MAXIMUM_WAIT_EVENTS (64). Currently registered 64 sockets per event.
should work fine ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r14085 r14159  
    6060    so->so_state = SS_NOFDREF;
    6161    so->s = -1;
    62 #if defined(VBOX_WITH_SIMPLEFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
    63     so->hNetworkEvent = WSACreateEvent(); /*XXX: NOT correct place*/
    64     AssertRelease(so->hNetworkEvent != WSA_INVALID_EVENT);
    65 #endif
    6662  }
    6763  return(so);
     
    740736}
    741737
     738#if defined(VBOX_WITH_SIMPLEFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
     739void soregister_event(struct NATState *pData, struct socket *so)
     740{
     741        static int soidx;
     742        static int eidx = 1;
     743       
     744        if (soidx >= WSA_MAXIMUM_WAIT_EVENTS * eidx) {
     745                eidx++;
     746        }
     747        so->hNetworkEvent = pData->phEvents[eidx];
     748        soidx++;
     749}
     750#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette