# HG changeset patch # User Jens Alfke # Date 1211689569 25200 # Node ID 76f302097a758d810113f4c41f801d7857133094 # Parent 9fdd8dba529c08bd07515cc226d56b3b2b164c05 Added a BLIP port of Apple's "CocoaEcho" sample code. diff -r 9fdd8dba529c -r 76f302097a75 BLIP/BLIP.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/BLIP.h Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,12 @@ +// +// BLIP.h +// MYNetwork +// +// Created by Jens Alfke on 5/24/08. +// Copyright 2008 __MyCompanyName__. All rights reserved. +// + +#import "BLIPConnection.h" +#import "BLIPDispatcher.h" +#import "BLIPRequest.h" +#import "BLIPProperties.h" diff -r 9fdd8dba529c -r 76f302097a75 BLIP/BLIPConnection.h --- a/BLIP/BLIPConnection.h Sat May 24 17:25:06 2008 -0700 +++ b/BLIP/BLIPConnection.h Sat May 24 21:26:09 2008 -0700 @@ -57,8 +57,10 @@ /** The delegate messages that BLIPConnection will send, - in addition to the ones inherited from TCPConnectionDelegate. */ + in addition to the ones inherited from TCPConnectionDelegate. + All methods are optional. */ @protocol BLIPConnectionDelegate +@optional /** Called when a BLIPRequest is received from the peer, if there is no BLIPDispatcher rule to handle it. @@ -68,10 +70,8 @@ to prevent this, call -deferResponse on the request if you want to send a response later. */ - (void) connection: (BLIPConnection*)connection receivedRequest: (BLIPRequest*)request; -@optional /** Called when a BLIPResponse (to one of your requests) is received from the peer. - This is called after the response object's onComplete target, if any, is invoked. - (This method is optional.) */ + This is called after the response object's onComplete target, if any, is invoked.*/ - (void) connection: (BLIPConnection*)connection receivedResponse: (BLIPResponse*)response; @end diff -r 9fdd8dba529c -r 76f302097a75 BLIP/BLIPMessage.h --- a/BLIP/BLIPMessage.h Sat May 24 17:25:06 2008 -0700 +++ b/BLIP/BLIPMessage.h Sat May 24 21:26:09 2008 -0700 @@ -82,6 +82,10 @@ /** Appends data to the body. */ - (void) addToBody: (NSData*)data; +/** The message body as an NSString. + The UTF-8 character encoding is used to convert. */ +@property (copy) NSString *bodyString; + #pragma mark PROPERTIES: /** The message's properties, a dictionary-like object. diff -r 9fdd8dba529c -r 76f302097a75 BLIP/BLIPMessage.m --- a/BLIP/BLIPMessage.m Sat May 24 17:25:06 2008 -0700 +++ b/BLIP/BLIPMessage.m Sat May 24 21:26:09 2008 -0700 @@ -144,6 +144,22 @@ } +- (NSString*) bodyString +{ + NSData *body = self.body; + if( body ) + return [[[NSString alloc] initWithData: body encoding: NSUTF8StringEncoding] autorelease]; + else + return nil; +} + +- (void) setBodyString: (NSString*)string +{ + self.body = [string dataUsingEncoding: NSUTF8StringEncoding]; + self.contentType = @"text/plain; charset=UTF-8"; +} + + - (BLIPProperties*) properties { return _properties; diff -r 9fdd8dba529c -r 76f302097a75 BLIP/Demo/BLIP Echo Client-Info.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/Demo/BLIP Echo Client-Info.plist Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + BLIPEchoClient + NSPrincipalClass + NSApplication + + diff -r 9fdd8dba529c -r 76f302097a75 BLIP/Demo/BLIPEchoClient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/Demo/BLIPEchoClient.h Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,30 @@ +// +// BLIPEchoClient.h +// MYNetwork +// +// Created by Jens Alfke on 5/24/08. +// Copyright 2008 Jens Alfke. All rights reserved. +// Adapted from Apple sample code "CocoaEcho". +// + +#import +@class BLIPConnection; + + +@interface BLIPEchoClient : NSObject +{ + IBOutlet NSTextField * inputField; + IBOutlet NSTextField * responseField; + IBOutlet NSTableView * serverTableView; + + NSNetServiceBrowser * _serviceBrowser; + NSMutableArray * _serviceList; + NSNetService *_resolvingService; + BLIPConnection *_connection; +} + +@property (readonly) NSMutableArray *serviceList; + +- (IBAction)sendText:(id)sender; + +@end diff -r 9fdd8dba529c -r 76f302097a75 BLIP/Demo/BLIPEchoClient.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/Demo/BLIPEchoClient.m Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,136 @@ +// +// BLIPEchoClient.m +// MYNetwork +// +// Created by Jens Alfke on 5/24/08. +// Copyright 2008 Jens Alfke. All rights reserved. +// Adapted from Apple sample code "CocoaEcho". +// + +#import "BLIPEchoClient.h" +#import "BLIP.h" +#import "IPAddress.h" +#import "Target.h" + + +@implementation BLIPEchoClient + +@synthesize serviceList=_serviceList; + +- (void)awakeFromNib +{ + _serviceBrowser = [[NSNetServiceBrowser alloc] init]; + _serviceList = [[NSMutableArray alloc] init]; + [_serviceBrowser setDelegate:self]; + + [_serviceBrowser searchForServicesOfType:@"_blipecho._tcp." inDomain:@""]; +} + +#pragma mark - +#pragma mark BLIPConnection support + +- (void)openConnection: (IPAddress*)address +{ + _connection = [[BLIPConnection alloc] initToAddress: address]; + [_connection open]; +} + +- (void)closeConnection +{ + [_connection close]; + [_connection release]; + _connection = nil; +} + +#pragma mark - +#pragma mark NSNetServiceBrowser delegate methods + +// We broadcast the willChangeValueForKey: and didChangeValueForKey: for the NSTableView binding to work. + +- (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing { + if (![_serviceList containsObject:aNetService]) { + [self willChangeValueForKey:@"serviceList"]; + [_serviceList addObject:aNetService]; + [self didChangeValueForKey:@"serviceList"]; + } +} + +- (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didRemoveService:(NSNetService *)aNetService moreComing:(BOOL)moreComing { + if ([_serviceList containsObject:aNetService]) { + [self willChangeValueForKey:@"serviceList"]; + [_serviceList removeObject:aNetService]; + [self didChangeValueForKey:@"serviceList"]; + } +} + +#pragma mark - +#pragma mark NSNetService delegate methods + +- (void)stopResolving +{ + if( _resolvingService ) { + _resolvingService.delegate = nil; + [_resolvingService stop]; + [_resolvingService release]; + _resolvingService = nil; + } +} + +- (void)startResolving: (NSNetService*)service +{ + [self stopResolving]; + _resolvingService = [service retain]; + _resolvingService.delegate = self; + [_resolvingService resolveWithTimeout: 5.0]; + +} + +- (void)netServiceDidResolveAddress:(NSNetService *)sender +{ + if( sender == _resolvingService ) { + NSArray *addresses = _resolvingService.addresses; + if( addresses.count > 0 ) { + NSData *addressData = [addresses objectAtIndex: 0]; + IPAddress *address = [[IPAddress alloc] initWithSockAddr: addressData.bytes]; + [self openConnection: address]; + [address release]; + } + [self stopResolving]; + } +} + +#pragma mark - +#pragma mark GUI action methods + +- (IBAction)serverClicked:(id)sender { + NSTableView * table = (NSTableView *)sender; + int selectedRow = [table selectedRow]; + + [self closeConnection]; + [self stopResolving]; + + if (-1 != selectedRow) { + [self startResolving: [_serviceList objectAtIndex:selectedRow]]; + } +} + +- (IBAction)sendText:(id)sender +{ + BLIPRequest *r = [_connection requestWithBody: nil]; + r.bodyString = [sender stringValue]; + BLIPResponse *response = [r send]; + response.onComplete = $target(self,gotResponse:); +} + +- (void) gotResponse: (BLIPResponse*)response +{ + [responseField setObjectValue: response.bodyString]; +} + + +@end + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff -r 9fdd8dba529c -r 76f302097a75 BLIP/Demo/BLIPEchoClient.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/Demo/BLIPEchoClient.xib Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,2176 @@ + + + + 1050 + 9C7010 + 658 + 949.26 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + 5 + 2 + {{372, 467}, {529, 256}} + 1886912512 + Echo client + NSWindow + + View + + {213, 107} + + + 256 + + YES + + + 256 + + YES + + + 2304 + + YES + + + 256 + {191, 183} + + YES + + + 256 + {191, 17} + + + + + + 256 + {{192, 0}, {16, 17}} + + + + YES + + serverName + 1.878271e+02 + 7.482715e+01 + 1.000000e+03 + + 75628032 + 0 + Echo servers + + LucidaGrande + 1.100000e+01 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + + LucidaGrande + 1.300000e+01 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 1.700000e+01 + -700448768 + 4 + 15 + 0 + YES + + + {{1, 17}, {191, 183}} + + + + + 4 + + + + 256 + {{192, 17}, {15, 183}} + + + _doScroller: + 9.631579e-01 + + + + 256 + {{1, 200}, {191, 15}} + + 1 + + _doScroller: + 9.904762e-01 + + + + 2304 + + YES + + + {{1, 0}, {191, 17}} + + + + + 4 + + + + {{20, 20}, {208, 216}} + + + 50 + + + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 256 + {{236, 143}, {273, 93}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 256 + {{236, 20}, {273, 93}} + + YES + + -2072904127 + 272630784 + + + + YES + + + + + + + 256 + {{233, 121}, {59, 14}} + + YES + + 67239424 + 272629760 + Response: + + + + 6 + System + controlColor + + + + + + + {529, 256} + + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + MainMenu + + YES + + + CocoaEchoClient + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + CocoaEchoClient + + YES + + + About CocoaEchoClient + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + UHJlZmVyZW5jZXPigKY + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide CocoaEchoClient + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + U2F2ZSBBc+KApg + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + UGFnZSBTZXR1cOKApg + P + 1048576 + 2147483647 + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + RmluZOKApg + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + U3BlbGxpbmfigKY + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + BLIPEchoClient + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + serverTableView + + + + 215 + + + + inputField + + + + 216 + + + + responseField + + + + 217 + + + + sendText: + + + + 218 + + + + delegate + + + + 219 + + + + serverClicked: + + + + 224 + + + + content: serviceList + + + + + + content: serviceList + content + serviceList + 2 + + + 225 + + + + value: serviceList.name + + + + + + value: serviceList.name + value + serviceList.name + 2 + + + 226 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 21 + + + YES + + + + Window + + + 2 + + + YES + + + + + + + + + 206 + + + YES + + + + + + + + + 207 + + + YES + + + + + + 208 + + + YES + + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + 213 + + + YES + + + + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 214 + + + EchoClientAppDelegate + + + 228 + + + + + 229 + + + + + 230 + + + + + 231 + + + + + 232 + + + + + 233 + + + + + 234 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 2.IBPluginDependency + 2.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 206.IBPluginDependency + 206.ImportedFromIB2 + 207.IBPluginDependency + 207.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 21.IBEditorWindowLastContentRect + 21.IBPluginDependency + 21.IBWindowTemplateEditedContentRect + 21.ImportedFromIB2 + 21.NSWindowTemplate.visibleAtLaunch + 21.windowTemplate.hasMinSize + 21.windowTemplate.minSize + 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBPluginDependency + 212.ImportedFromIB2 + 213.IBPluginDependency + 213.ImportedFromIB2 + 214.IBPluginDependency + 214.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 231.IBShouldRemoveOnLegacySave + 232.IBShouldRemoveOnLegacySave + 233.IBShouldRemoveOnLegacySave + 234.IBShouldRemoveOnLegacySave + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{108, 555}, {529, 256}} + com.apple.InterfaceBuilder.CocoaPlugin + {{108, 555}, {529, 256}} + + + + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + {{98, 802}, {368, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 234 + + + + YES + + BLIPEchoClient + NSObject + + sendText: + id + + + YES + + YES + inputField + responseField + serverTableView + + + YES + NSTextField + NSTextField + NSTableView + + + + IBProjectSource + BLIP/Demo/BLIPEchoClient.h + + + + BLIPEchoClient + NSObject + + IBUserSource + + + + + FirstResponder + + IBUserSource + + + + + + 0 + + 3 + + diff -r 9fdd8dba529c -r 76f302097a75 BLIP/Demo/BLIPEchoServer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/Demo/BLIPEchoServer.h Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,17 @@ +// +// BLIPEchoServer.h +// MYNetwork +// +// Created by Jens Alfke on 5/24/08. +// Copyright 2008 Jens Alfke. All rights reserved. +// + +#import +#import "BLIPConnection.h" + +@interface BLIPEchoServer : NSObject +{ + BLIPListener *_listener; +} + +@end diff -r 9fdd8dba529c -r 76f302097a75 BLIP/Demo/BLIPEchoServer.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLIP/Demo/BLIPEchoServer.m Sat May 24 21:26:09 2008 -0700 @@ -0,0 +1,70 @@ +// +// BLIPEchoServer.m +// MYNetwork +// +// Created by Jens Alfke on 5/24/08. +// Copyright 2008 Jens Alfke. All rights reserved. +// + +#import "BLIPEchoServer.h" +#import "BLIP.h" + + +@implementation BLIPEchoServer + + +- (id) init +{ + self = [super init]; + if (self != nil) { + _listener = [[BLIPListener alloc] initWithPort: 12345]; + _listener.delegate = self; + _listener.pickAvailablePort = YES; + _listener.bonjourServiceType = @"_blipecho._tcp"; + [_listener open]; + NSLog(@"%@ is listening...",self); + } + return self; +} + +- (void) dealloc +{ + [_listener close]; + [_listener release]; + [super dealloc]; +} + +- (void) listener: (TCPListener*)listener failedToOpen: (NSError*)error +{ + NSLog(@"** %@ failed to open: %@",self,error); +} + +- (void) listener: (TCPListener*)listener didAcceptConnection: (TCPConnection*)connection +{ + NSLog(@"** %@ accepted %@",self,connection); + connection.delegate = self; +} + +- (void) connection: (TCPConnection*)connection failedToOpen: (NSError*)error +{ + NSLog(@"** %@ failedToOpen: %@",connection,error); +} + +- (void) connection: (BLIPConnection*)connection receivedRequest: (BLIPRequest*)request +{ + NSLog(@"***** %@ received %@",connection,request); + [request respondWithData: request.body contentType: request.contentType]; +} + + +@end + + +int main( int argc, const char **argv ) +{ + NSAutoreleasePool *pool = [NSAutoreleasePool new]; + BLIPEchoServer *listener = [[BLIPEchoServer alloc] init]; + [[NSRunLoop currentRunLoop] run]; + [listener release]; + [pool drain]; +} diff -r 9fdd8dba529c -r 76f302097a75 MYNetwork.xcodeproj/project.pbxproj --- a/MYNetwork.xcodeproj/project.pbxproj Sat May 24 17:25:06 2008 -0700 +++ b/MYNetwork.xcodeproj/project.pbxproj Sat May 24 21:26:09 2008 -0700 @@ -12,7 +12,6 @@ 270461150DE49030003D9D3F /* BLIPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460F90DE49030003D9D3F /* BLIPMessage.m */; }; 270461160DE49030003D9D3F /* BLIPProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460FB0DE49030003D9D3F /* BLIPProperties.m */; }; 270461170DE49030003D9D3F /* BLIPReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460FD0DE49030003D9D3F /* BLIPReader.m */; }; - 270461180DE49030003D9D3F /* BLIPTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460FE0DE49030003D9D3F /* BLIPTest.m */; }; 270461190DE49030003D9D3F /* BLIPWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461000DE49030003D9D3F /* BLIPWriter.m */; }; 2704611A0DE49030003D9D3F /* IPAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461020DE49030003D9D3F /* IPAddress.m */; }; 2704611B0DE49030003D9D3F /* TCPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 2704610A0DE49030003D9D3F /* TCPConnection.m */; }; @@ -28,7 +27,27 @@ 270461890DE49634003D9D3F /* CollectionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461870DE49634003D9D3F /* CollectionUtils.m */; }; 2704618C0DE49652003D9D3F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2704618B0DE49652003D9D3F /* libz.dylib */; }; 270461920DE4975D003D9D3F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270461910DE4975C003D9D3F /* CoreServices.framework */; }; - 270462C20DE4A64B003D9D3F /* MYUtilitiesTest_main.m in Sources */ = {isa = PBXBuildFile; fileRef = 270462C10DE4A64B003D9D3F /* MYUtilitiesTest_main.m */; }; + 277904330DE91DE600C6D295 /* BLIPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460F40DE49030003D9D3F /* BLIPConnection.m */; }; + 277904340DE91DE700C6D295 /* BLIPDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460F60DE49030003D9D3F /* BLIPDispatcher.m */; }; + 277904350DE91DE800C6D295 /* BLIPEchoClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 277903E90DE8F08100C6D295 /* BLIPEchoClient.m */; }; + 277904370DE91DEB00C6D295 /* BLIPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460F90DE49030003D9D3F /* BLIPMessage.m */; }; + 277904380DE91DEC00C6D295 /* BLIPProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460FB0DE49030003D9D3F /* BLIPProperties.m */; }; + 277904390DE91DEE00C6D295 /* BLIPReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 270460FD0DE49030003D9D3F /* BLIPReader.m */; }; + 2779043A0DE91DEF00C6D295 /* BLIPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D5EC060DE5FEDE00CD84FA /* BLIPRequest.m */; }; + 2779043C0DE91DF100C6D295 /* BLIPWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461000DE49030003D9D3F /* BLIPWriter.m */; }; + 2779043D0DE91DF300C6D295 /* IPAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461020DE49030003D9D3F /* IPAddress.m */; }; + 2779043E0DE91DF500C6D295 /* TCPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 2704610A0DE49030003D9D3F /* TCPConnection.m */; }; + 2779043F0DE91DF800C6D295 /* TCPEndpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 2704610C0DE49030003D9D3F /* TCPEndpoint.m */; }; + 277904400DE91DF900C6D295 /* TCPListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 2704610E0DE49030003D9D3F /* TCPListener.m */; }; + 277904410DE91DFA00C6D295 /* TCPStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461100DE49030003D9D3F /* TCPStream.m */; }; + 277904420DE91DFC00C6D295 /* TCPWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461120DE49030003D9D3F /* TCPWriter.m */; }; + 277904440DE91E3500C6D295 /* CollectionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461870DE49634003D9D3F /* CollectionUtils.m */; }; + 277904450DE91E3600C6D295 /* ExceptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461350DE4918D003D9D3F /* ExceptionUtils.m */; }; + 277904460DE91E3700C6D295 /* Logging.m in Sources */ = {isa = PBXBuildFile; fileRef = 2704612A0DE49088003D9D3F /* Logging.m */; }; + 277904480DE91E3900C6D295 /* Target.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461460DE491A6003D9D3F /* Target.m */; }; + 277904490DE91E3A00C6D295 /* Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 270461280DE49088003D9D3F /* Test.m */; }; + 2779046D0DE91F4200C6D295 /* BLIPEchoServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 277903D60DE8EE4800C6D295 /* BLIPEchoServer.m */; }; + 2779048B0DE9204300C6D295 /* BLIPEchoClient.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2779048A0DE9204300C6D295 /* BLIPEchoClient.xib */; }; 27D5EC070DE5FEDE00CD84FA /* BLIPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D5EC060DE5FEDE00CD84FA /* BLIPRequest.m */; }; 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; /* End PBXBuildFile section */ @@ -94,11 +113,26 @@ 270462C10DE4A64B003D9D3F /* MYUtilitiesTest_main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MYUtilitiesTest_main.m; sourceTree = ""; }; 270462C30DE4A65B003D9D3F /* BLIP Overview.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "BLIP Overview.txt"; path = "BLIP/BLIP Overview.txt"; sourceTree = ""; wrapsLines = 1; }; 277903830DE8C2DD00C6D295 /* maindocs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maindocs.h; sourceTree = ""; wrapsLines = 1; }; + 277903D50DE8EE4800C6D295 /* BLIPEchoServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BLIPEchoServer.h; sourceTree = ""; }; + 277903D60DE8EE4800C6D295 /* BLIPEchoServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BLIPEchoServer.m; sourceTree = ""; }; + 277903D80DE8EFC900C6D295 /* BLIP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BLIP.h; sourceTree = ""; }; + 277903E80DE8F08100C6D295 /* BLIPEchoClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BLIPEchoClient.h; sourceTree = ""; }; + 277903E90DE8F08100C6D295 /* BLIPEchoClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BLIPEchoClient.m; sourceTree = ""; }; + 277904260DE91C7900C6D295 /* BLIP Echo Client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BLIP Echo Client.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 277904280DE91C7900C6D295 /* BLIP Echo Client-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BLIP Echo Client-Info.plist"; sourceTree = ""; }; + 2779048A0DE9204300C6D295 /* BLIPEchoClient.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BLIPEchoClient.xib; sourceTree = ""; }; 27D5EC050DE5FEDE00CD84FA /* BLIPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BLIPRequest.h; sourceTree = ""; }; 27D5EC060DE5FEDE00CD84FA /* BLIPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BLIPRequest.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 277904240DE91C7900C6D295 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8DD76F9B0486AA7600D96B5E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -140,6 +174,7 @@ isa = PBXGroup; children = ( 270461720DE49340003D9D3F /* MYNetwork */, + 277904260DE91C7900C6D295 /* BLIP Echo Client.app */, ); name = Products; sourceTree = ""; @@ -158,6 +193,7 @@ 270460F10DE49030003D9D3F /* BLIP */ = { isa = PBXGroup; children = ( + 277903D80DE8EFC900C6D295 /* BLIP.h */, 270460F30DE49030003D9D3F /* BLIPConnection.h */, 270460F40DE49030003D9D3F /* BLIPConnection.m */, 270460F50DE49030003D9D3F /* BLIPDispatcher.h */, @@ -174,6 +210,7 @@ 270461000DE49030003D9D3F /* BLIPWriter.m */, 270460FE0DE49030003D9D3F /* BLIPTest.m */, 270460F70DE49030003D9D3F /* BLIP_Internal.h */, + 277903E70DE8F05F00C6D295 /* Demo */, ); path = BLIP; sourceTree = ""; @@ -226,9 +263,39 @@ name = "google-toolbox"; sourceTree = "google-toolbox"; }; + 277903E70DE8F05F00C6D295 /* Demo */ = { + isa = PBXGroup; + children = ( + 277903D50DE8EE4800C6D295 /* BLIPEchoServer.h */, + 277903D60DE8EE4800C6D295 /* BLIPEchoServer.m */, + 277903E80DE8F08100C6D295 /* BLIPEchoClient.h */, + 277903E90DE8F08100C6D295 /* BLIPEchoClient.m */, + 2779048A0DE9204300C6D295 /* BLIPEchoClient.xib */, + 277904280DE91C7900C6D295 /* BLIP Echo Client-Info.plist */, + ); + path = Demo; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 277904250DE91C7900C6D295 /* BLIP Echo Client */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2779042B0DE91C7A00C6D295 /* Build configuration list for PBXNativeTarget "BLIP Echo Client" */; + buildPhases = ( + 277904220DE91C7900C6D295 /* Resources */, + 277904230DE91C7900C6D295 /* Sources */, + 277904240DE91C7900C6D295 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "BLIP Echo Client"; + productName = "BLIP Echo Client"; + productReference = 277904260DE91C7900C6D295 /* BLIP Echo Client.app */; + productType = "com.apple.product-type.application"; + }; 8DD76F960486AA7600D96B5E /* MYNetwork */ = { isa = PBXNativeTarget; buildConfigurationList = 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "MYNetwork" */; @@ -260,11 +327,49 @@ projectRoot = ""; targets = ( 8DD76F960486AA7600D96B5E /* MYNetwork */, + 277904250DE91C7900C6D295 /* BLIP Echo Client */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 277904220DE91C7900C6D295 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2779048B0DE9204300C6D295 /* BLIPEchoClient.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ + 277904230DE91C7900C6D295 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 277904330DE91DE600C6D295 /* BLIPConnection.m in Sources */, + 277904340DE91DE700C6D295 /* BLIPDispatcher.m in Sources */, + 277904350DE91DE800C6D295 /* BLIPEchoClient.m in Sources */, + 277904370DE91DEB00C6D295 /* BLIPMessage.m in Sources */, + 277904380DE91DEC00C6D295 /* BLIPProperties.m in Sources */, + 277904390DE91DEE00C6D295 /* BLIPReader.m in Sources */, + 2779043A0DE91DEF00C6D295 /* BLIPRequest.m in Sources */, + 2779043C0DE91DF100C6D295 /* BLIPWriter.m in Sources */, + 2779043D0DE91DF300C6D295 /* IPAddress.m in Sources */, + 2779043E0DE91DF500C6D295 /* TCPConnection.m in Sources */, + 2779043F0DE91DF800C6D295 /* TCPEndpoint.m in Sources */, + 277904400DE91DF900C6D295 /* TCPListener.m in Sources */, + 277904410DE91DFA00C6D295 /* TCPStream.m in Sources */, + 277904420DE91DFC00C6D295 /* TCPWriter.m in Sources */, + 277904440DE91E3500C6D295 /* CollectionUtils.m in Sources */, + 277904450DE91E3600C6D295 /* ExceptionUtils.m in Sources */, + 277904460DE91E3700C6D295 /* Logging.m in Sources */, + 277904480DE91E3900C6D295 /* Target.m in Sources */, + 277904490DE91E3A00C6D295 /* Test.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8DD76F990486AA7600D96B5E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -274,7 +379,6 @@ 270461150DE49030003D9D3F /* BLIPMessage.m in Sources */, 270461160DE49030003D9D3F /* BLIPProperties.m in Sources */, 270461170DE49030003D9D3F /* BLIPReader.m in Sources */, - 270461180DE49030003D9D3F /* BLIPTest.m in Sources */, 270461190DE49030003D9D3F /* BLIPWriter.m in Sources */, 2704611A0DE49030003D9D3F /* IPAddress.m in Sources */, 2704611B0DE49030003D9D3F /* TCPConnection.m in Sources */, @@ -288,8 +392,8 @@ 270461470DE491A6003D9D3F /* Target.m in Sources */, 270461700DE492F3003D9D3F /* GTMNSData+zlib.m in Sources */, 270461890DE49634003D9D3F /* CollectionUtils.m in Sources */, - 270462C20DE4A64B003D9D3F /* MYUtilitiesTest_main.m in Sources */, 27D5EC070DE5FEDE00CD84FA /* BLIPRequest.m in Sources */, + 2779046D0DE91F4200C6D295 /* BLIPEchoServer.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -332,13 +436,15 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_C_LANGUAGE_STANDARD = c99; + GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; SDKROOT = macosx10.5; + WARNING_CFLAGS = "-Wall"; }; name = Debug; }; @@ -346,11 +452,60 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_C_LANGUAGE_STANDARD = c99; + GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = macosx10.5; + WARNING_CFLAGS = "-Wall"; + }; + name = Release; + }; + 277904290DE91C7A00C6D295 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "BLIP/Demo/BLIP Echo Client-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = "BLIP Echo Client"; + }; + name = Debug; + }; + 2779042A0DE91C7A00C6D295 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "BLIP/Demo/BLIP Echo Client-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = "BLIP Echo Client"; + ZERO_LINK = NO; }; name = Release; }; @@ -375,6 +530,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 2779042B0DE91C7A00C6D295 /* Build configuration list for PBXNativeTarget "BLIP Echo Client" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 277904290DE91C7A00C6D295 /* Debug */, + 2779042A0DE91C7A00C6D295 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;