Advertisement

detecting cable disconnection in DirectPlay8

Started by July 06, 2004 05:03 AM
2 comments, last by oliii 20 years, 7 months ago
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.

Everything is better with Metal.

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
Advertisement
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.
"Let Us Now Try Liberty"-- Frederick Bastiat
thanks a lot guys. I'll try that.

Everything is better with Metal.

This topic is closed to new replies.

Advertisement