Jump to content
  • Advertisement
Sign in to follow this  
oliii

detecting cable disconnection in DirectPlay8

This topic is 5097 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

So, how to detect cable disconenction quickly? If possible synchronous (just a quick query stab). Otherwise, I'm thinking of sending a message to myself, but it seems convoluted. Can't find the error ENUM for cable disconnection in DirectX8.

Share this post


Link to post
Share on other sites
Advertisement
You will receive a DPN_MSGID_DESTROY_PLAYER message and the dwReason structure member will be set to DPNDESTROYPLAYERREASON_CONNECTIONLOST. Don't try to be smart and perform some early detection by sending SYNC'd messages; that will only aggravate the problem. DP8 has some internal mechanism to retry a failed connection until it concludes it's no longer active and should be considered lost; just leave it to DP8 to make that detection and send you the notification.

You can change the default settings for which DP8 is to consider a connection lost. Those settings are found in the DPN_CAPS structure you can modify using the GetCaps() and SetCaps() methods. This is a global setting that affects all players in a session, not just one in particular.

-cb

Share this post


Link to post
Share on other sites
Quote:
Original post by cbenoi1
You will receive a DPN_MSGID_DESTROY_PLAYER message and the dwReason structure member will be set to DPNDESTROYPLAYERREASON_CONNECTIONLOST. Don't try to be smart and perform some early detection by sending SYNC'd messages; that will only aggravate the problem. DP8 has some internal mechanism to retry a failed connection until it concludes it's no longer active and should be considered lost; just leave it to DP8 to make that detection and send you the notification.

You can change the default settings for which DP8 is to consider a connection lost. Those settings are found in the DPN_CAPS structure you can modify using the GetCaps() and SetCaps() methods. This is a global setting that affects all players in a session, not just one in particular.

-cb


right on and seconded.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!