Microsoft DirectX 8.1 (Visual Basic)

Host Migration

While the host must be one of the initial members of the session, they may choose to leave before session is finished. When the host leaves the session, there are two possible outcomes:

Sessions may or may not permit host migration. To enable host migration, the session organizer must set the DPNSESSION_MIGRATE_HOST flag in the dwFlags member of the DPN_APPLICATION_DESC type when they set up the game. If this flag is not set, the session terminates when the host leaves or loses their connection.

If the DPNSESSION_MIGRATE_HOST flag is set, the host can still force the session to terminate by calling DirectPlay8Peer.TerminateSession.

If DPNSESSION_MIGRATE_HOST flag is set and the host leaves the session, Microsoft® DirectPlay® will select a new session host. DirectPlay will call the DirectPlay8Event.HostMigrate method of all remaining session members with the ID of the new host.