Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Foundation/Foundation.h>
- @interface Server : NSObject {
- // Server Configuration
- NSString* _serverName;
- NSString* _serverGreeting;
- NSInteger _receiverPort;
- NSInteger _maxPlayers;
- NSString* _MD5Salt;
- NSString* _externalURL;
- BOOL _isPublic;
- BOOL _doesHeartbeat;
- BOOL _doesFListHeartbeat;
- BOOL _doesVerifyNames;
- // Receiver
- NSFileHandle* _receiverHandle;
- // RunLoop
- NSTimer* _heartbeatTimer;
- CFRunLoopSourceRef _runLoopStopSource;
- BOOL _shouldKeepRunning;
- // Clients (hashed by uid)
- NSMutableDictionary* clients;
- NSMutableIndexSet* availablePIDs;
- // Operation Queueing
- NSOperationQueue* _taskQueue;
- }
- @property(copy) NSString* serverName;
- @property(copy) NSString* serverGreeting;
- @property(assign) NSInteger receiverPort;
- @property(assign) NSInteger maxPlayers;
- @property(copy) NSString* MD5Salt;
- @property(copy) NSString* externalURL;
- @property(assign) BOOL isPublic;
- @property(assign) BOOL doesHeartbeat;
- @property(assign) BOOL doesFListHeartbeat;
- @property(assign) BOOL doesVerifyNames;
- @property(retain) NSFileHandle* receiverHandle;
- @property(retain) NSTimer* heartbeatTimer;
- @property(assign) CFRunLoopSourceRef runLoopStopSource;
- @property(assign) BOOL shouldKeepRunning;
- // Mutable types should
- // not be exposed.
- @property(retain) NSOperationQueue* taskQueue;
- + (Server*)sharedInstance;
- -(void)start;
- -(void)stop;
- -(void)cleanup;
- -(void)heartbeat;
- -(void)connectionWasAccepted:(NSNotification*)notification;
- @end
Add Comment
Please, Sign In to add comment