Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 4 - NetSprocket / NetSprocket Reference
Constants


Network Message Delivery Flags

These constants are message delivery flags to assist you in determining and controlling the status of message delivery. You can OR these constants together with the network message priority flags.

Note
A message that is successfully sent does not ensure receipt by the intended players unless kNSpRegistered is specified. It simply means that NetSprocket successfully delivered the message to the appropriate network protocol handler and the message has been duly passed on.
enum {
   kNSpFailIfPipeFull      = 0x00000001,
   kNSpSelfSend            = 0x00000002,
   kNSpBlocking            = 0x00000004
};
Constant descriptions

kNSpFailIfPipeFull
NetSprocket will not accept the network message you are attempting to send if there are too many messages pending in the output buffer. Use this if you want to send data that is extremely time critical and useless if not delivered immediately.
kNSpSelfSend
This flag is used to instruct NetSprocket to send a copy of this message to yourself as a player in addition to any other players or groups it is addressed to. You will receive a copy of your message in the message queue. If you send a message to all players (kNSpAllPlayers) without setting this flag, NetSprocket will not deliver the message to the sender.
kNSpBlocking
This flag is used to have NetSprocket block the call and not return until the message has been successfully sent. The combination of kNSpBlocking and kNSpRegistered may cause your application to wait a significant period of time before satisfying these requirements, because it will wait until all the recipients have acknowledged receipt of the message or the retry limit has been reached.
Note
In NetSprocket version 1.0, a message sent from any player who is not the host with this flag set will return when the message has been delivered to the host. The message may or may not have been received by all of the intended recipients.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996