Sign in to follow this  
oliii

detecting cable disconnection in DirectPlay8

Recommended Posts

oliii    2196
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
cbenoi1    484
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this