NSpProtocol_CreateIP
You can use the NSpProtocol_CreateIP function to have NetSprocket create an IP protocol reference for you.
NSpProtocolReference NSpProtocol_CreateIP ( InetPort inPort, UInt32 inMaxRTT, UInt32 inMinThruput);
inPort
- The port on which you wish to listen for new players. Since there is no dynamic name lookup in IP, prospective players cannot know what port a game is being played on unless they receive that information from the hosting player in a manner external to the real-time network. In order to notify you, the person hosting the game might send you electronic mail, call you, or leave a sticky note on your computer telling you what game the port is on and what time to join. When you use the NSpProtocol_CreateIP function, you can specify the default port your game is hosted on. You can then specify the same port as the default port t use when joining a game.
inMaxRTT
- The maximum round-trip time 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 specified 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 TCP/IP (Internet) protocol before callingNSpDoModalHostDialog
or if you want to host the game programmatically.