Archived

This topic is now archived and is closed to further replies.

Simple Direct Play Question....

This topic is 5335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just learning DPlay, and so far..it''s very easy, but.. I was wondering why I get 2 DPN_MSGID_ENUM_HOSTS_QUERY messages on the server and 2 DPN_MSGID_ENUM_HOSTS_RESPONSE messages on the client. as you can see from the following line, I set it to only enum 1 time... hr = m_Client->EnumHosts(&dpnAppDesc,ServerList->DirectPlayAddress,m_DP8AddrLocal,NULL,0,1,0,0,NULL,&ServerList[i]->HEnumCancel,0); If I set it to 2, I get 4 messages each..understand? I''m testing on the same computer, so the only thing I can think of is that''s it''s because of how I have my home network. I''m setup like this... 2 computers each connected to a hub.. DSL modem connected to the hub.. 1 connects to the net using pppoe and the other shares the connection. so is 1 message for the dynamic IP and one for the static IP used to share the connection? or does DPlay always send 2 messages?

Share this post


Link to post
Share on other sites
You have not set the retry interval value (=0), and thus DP reverts to some very low internal default value. That time ''dwRetryInterval'' between each polling send could be smaller than the speed at which the net can respond. Try a timeout value of 1/2 seconds (dwRetryInterval=500). I suggest you boost the dwEnumCount value to 4 so that you get a 2 seconds window for hosts to start responding.

In any case, you need to make sure that your client logs in the DPN_MSGID_ENUM_HOSTS_RESPONSE hits once and only once. That can be done easily with an stl::map<>.

-cb

Share this post


Link to post
Share on other sites