langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -0,0 +1,40 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "ActionObject.h"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
ActionObject *action;
|
||||
NSConnection *connect;
|
||||
NSSocketPort *port;
|
||||
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
action = [[ActionObject alloc] init];
|
||||
|
||||
port = (NSSocketPort *)[NSSocketPort port];
|
||||
// initWithTCPPort: 1234 and other methods are not supported yet
|
||||
// by GNUstep
|
||||
connect = [NSConnection
|
||||
connectionWithReceivePort: port
|
||||
sendPort: port]; // or sendPort: nil
|
||||
|
||||
[connect setRootObject: action];
|
||||
|
||||
/* "vend" the object ActionObject as DistributedAction; on GNUstep
|
||||
the Name Server that allows the resolution of the registered name
|
||||
is bound to port 538 */
|
||||
if ([connect registerName:@"DistributedAction"
|
||||
withNameServer: [NSSocketPortNameServer sharedInstance] ] == NO)
|
||||
{
|
||||
NSLog(@"can't register the server DistributedAction");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
NSLog(@"waiting for messages...");
|
||||
|
||||
[[NSRunLoop currentRunLoop] run];
|
||||
|
||||
[pool release];
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue