Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 4 - NetSprocket / NetSprocket Reference
NetSprocket Functions / Managing Player Information


NSpPlayer_GetRoundTripTime

You can use the NSpPlayer_GetRoundTripTime function to determine how many milliseconds elapse between sending a message to a specific player and receiving a reply. Round-trip time between any two players may vary greatly during the course of a game.

UInt32 NSpPlayer_GetRoundTripTime (
	NSpGameReference inGame,
	NSpPlayerID inPlayer);
inGame
An opaque reference to your game object.
inPlayer
The player ID you are sending the test message to.
function result
The time elapsed between sending and receiving a message.
DESCRIPTION
This function is synchronous. That is, it blocks until a reply is received unless the time-out is reached. If time-out is exceeded, -1 will be returned.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996