Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 4 - NetSprocket / NetSprocket Reference
NetSprocket Functions / Managing Network Protocols


NSpProtocol_CreateAppleTalk

You can use the NSpProtocol_CreateAppleTalk function to have NetSprocket create an AppleTalk protocol reference for you, using the parameters you provide.

NSpProtocolReference NSpProtocol_CreateAppleTalk (
	ConstStr31Param inNBPName,
	ConstStr31Param inNBPType,
	UInt32 inMaxRTT,
	UInt32 inMinThruput);
inNBPName
The Name Binding Protocol name you wish users to see when browsing the AppleTalk network.
inNBPType
The Name Binding Protocol type to use when advertising the game on an AppleTalk network. This name should be representative of your game, but is never displayed to users. This name must be the same as the one you use in the ioGameType field of the NSpGame_Join function.
inMaxRTT
The maximum round-trip time (RTT) allowed for new players. Pass 0 if you do not wish to have round-trip time checked. This does not guarantee that RTT will remain at the level it is when the player joins. RTT is in milliseconds.
inMinThruput
The minimum throughput required of any prospective entrant into the game. Pass 0 if you do not wish to have throughput checked. This does not guarantee that throughput will remain at the level it is when the player joins. Throughput is measured in bytes per second.
function result
A reference to the created protocol, or NULL if there was an error in specifying the protocol.
DESCRIPTION
Use this function if you wish to preconfigure the AppleTalk protocol before calling NSpDoModalHostDialog, or if you want to host the game programmatically.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996