🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DirectPlay detecting host....how???

Started by
0 comments, last by volcano79 23 years, 6 months ago
Hi, Below are in the context of DirectX8. By calling IDirectPlay8Peer''s EnumSessions(), we are able to try to find sessions that are created by any computer in the connected network. Let''s use LAN as an exmaple. There are computers A, B, C. A created a session, and so when a host is found, B and C receive a DPNMSGID_ENUM_HOST_RESPONSE system message, and there, we can add the game sessions found in a list which we can display in the fullscreen app in B and C. BUT the problem I am facing here is: when A decided to terminate the session, how do we update this piece of information in B and C? There is no system message sent to both B and C. Although A calls IDirectPlay8Peer''s TerminateSession() which will trigger a DPNMSG_ID_TERMINATE_SESSION sys msg, it only sends it to connected players. B and C are not yet connected to the session, so they will not recieve that piece of information. So how can we update the list gracefully to reflect that A has terminated a session? and we can update the list on the fullscreen DirectX app without any flickering? Hope I have explained my predicament clearly.. and hope someone out there can help... Thanks!
Advertisement
Timestamp the enumeration. After x amount of time, renumerate the list. I believe some of the samples use a similar method.

The worse that can happen is if a player tries to join a game that is no longer there. They would just get a failed connect, no big deal if you check for it.

LostLogic
"My new book on multiplayer game programming out Q2/2001"

LostLogicwww.GamerOutfit.comXBox 360 Community Games Reviews and NewsExisled - 2D/3D Shooter for XBox 360

This topic is closed to new replies.

Advertisement