mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Initial revision
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@749 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0797514fca
commit
2b5de0130d
4 changed files with 184 additions and 0 deletions
20
Examples/nx-client.m
Normal file
20
Examples/nx-client.m
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include <remote/NXConnection.h>
|
||||
#include <remote/NXProxy.h>
|
||||
#include <objc/List.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
id s;
|
||||
|
||||
s = [NXConnection connectToName:"nxserver"];
|
||||
|
||||
printf("Server has class name `%s'\n",
|
||||
[s name]);
|
||||
printf("First object in server has class name `%s'\n",
|
||||
[[s objectAt:0] name]);
|
||||
|
||||
/* Be nice and shut down the connection */
|
||||
[[s connectionForProxy] free];
|
||||
|
||||
exit(0);
|
||||
}
|
15
Examples/nx-server.m
Normal file
15
Examples/nx-server.m
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include <remote/NXConnection.h>
|
||||
#include <objc/List.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
id s = [[List alloc] init];
|
||||
id c;
|
||||
|
||||
[s addObject:[Object new]];
|
||||
|
||||
c = [NXConnection registerRoot:s withName:"nxserver"];
|
||||
[c run];
|
||||
|
||||
exit(0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue