Clearing FD_RECV and FD_CLOSE from the event flags when processing a
recv() event will prevent the other worker threads associated with that
socket from waking up repeatedly, checking recv_busy, then sleeping
without having done anything, wasting time and potentially preventing
them from servicing their other sockets.
- IDirectPlay8Peer::EnumHosts() requires a device address to specify
the service provider to emulate.
- IDirectPlay8Peer::EnumHosts() allows overriding the address/port
that discovery messages are sent to.
- IDirectPlay8Peer::Host() requires at least one address. Addresses
with different service providers are not supported yet.
- Implement IDirectPlay8Peer::GetPeerAddress() method.
- Populate pAddressSender in DPNMSG_ENUM_HOSTS_QUERY message.
- Popupate pAddressPlayer in DPNMSG_INDICATE_CONNECT message.
- Base host addresses created by IDirectPlay8Peer on service provider
of device address given to Host() method.
The threading model used for processing messages here will need
redesigning; we can't allow the application to block the event loop
when processing a message in case it calls something which won't
return until a message is processed.
Final model will probably use a pool of workers which will handle I/O
one-at-a-time, blocking and allowing other threads to deal with the
I/O when in the application message callback.
The protocol is going to use TLV messages, containing zero or more
fields represented using the same TLV header. Functions for
(de)serialising DirectPlay message structures will be built on top of
these classes.