This is NetworkPlayer.h in view mode; [Download] [Up]
/* * NetworkPlayer * description: a networked subclass of Player. * history: * 3/15/93 [Erik Kay] - created * 6/2/93 [Erik Kay] - reworked much of the code * 6/8/93 [Erik Kay] - better error recovery * 6/8/93 [Erik Kay] - bycopy support for transmitting boards */ #import "Player.h" #import <mach/cthreads.h> // You might wonder why I broke these methods into protocols. I wonder too.:-) // actually, it seems that for some reason, when I put oneway methods into // the interface specification, it won't compile. I haven't found out why // that is yet. @protocol SplatServerMethods - (oneway void) lookForClient; - connectToClient; - (oneway void) completedMove:(in move *)mv; - (oneway void) stopGame; - (oneway void) pauseGame; @end @protocol SplatClientMethods - connectToServer; - lookForServer; - (oneway void) initNetGame; - (oneway void) setClientBoard:(bycopy Board *)b; - (oneway void) completedMove:(in move *)mv; - (oneway void) stopGame; - (oneway void) pauseGame; - (oneway void) unpauseGame; @end @interface NetworkPlayer:Player <SplatServerMethods,SplatClientMethods,NXSenderIsInvalid> { char hostname[256]; char myServerName[256]; char otherServerName[256]; NXConnection *myServer; id otherPlayer; } - setHostname:(const char *)nm; - (char *)hostname; - (char *)otherPlayerName; - (BOOL) isConnected; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.