00001 // 00002 // PeerServer.h 00003 // DistributedCalendar 00004 // 00005 // Created by Jagdish on 8/5/10. 00006 // Copyright 2010 __MyCompanyName__. All rights reserved. 00007 // 00008 00033 #import <Foundation/Foundation.h> 00034 00035 #import "PeerServerDelegate.h" 00036 00037 00041 @interface PeerServer : NSObject { 00042 00043 uint16_t port; 00044 CFSocketRef listeningSocket; 00045 id<PeerServerDelegate> delegate; 00046 NSNetService* netService; 00047 } 00048 00049 // Delegate receives various notifications about the state of our server 00050 @property (nonatomic, retain) id<PeerServerDelegate> delegate; 00051 00052 00053 // Initialize and start listening for connections 00058 - (BOOL)start; 00059 00060 00061 // Stop the service 00065 - (void)stop; 00066 00067 00068 // Will return netService 00073 - (NSNetService *)getNSNetService; 00074 00075 00076 00077 @end
1.7.2