libs-base/Examples/first-server.m
Andrew McCallum 3f093c4909 Change all include objects/*.h to include gnustep/base/*.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1433 72102866-910b-0410-8b05-ffd578937521
1996-04-17 18:40:03 +00:00

31 lines
712 B
Objective-C

#include <gnustep/base/Connection.h>
#include "first-server.h"
#include <gnustep/base/String.h>
@implementation FirstServer
- sayHiTo: (char *)name
{
printf("Hello, %s.\n", name);
return self;
}
@end
int main()
{
id s, c;
/* Create our server object */
s = [[FirstServer alloc] init];
/* Register a connection that provides the server object to the network */
printf("Registering a connection for the server using name `firstserver'\n");
c = [Connection newRegisteringAtName:@"firstserver"
withRootObject:s];
/* Run the connection */
printf("Running the connection... (until you interrupt with control-C)\n");
[c runConnection]; /* This runs until interrupt. */
exit(0);
}