This is servermain.m in view mode; [Download] [Up]
/**************************************************/
/* (c) 1994 by S Leuker, all rights reserved. */
/* This source code may be used as a basis for */
/* a server managing distributred objects. */
/* It is part of nettalkd, the server managing */
/* NetTalk clients. */
/**************************************************/
#import "NetTalkServer.h"
#import <stdio.h>
#import <bsd/libc.h>
void
usage()
{
fprintf(stderr, "usage: nettalkd [-f time]\n");
fprintf(stderr, "means: -f time timeout in minutes idle time.\n");
fprintf(stderr, " 0 means no timeout.\n");
fprintf(stderr, " Timeout does not work in this release!\n");
exit(1);
}
void
main(int argc, char *argv[])
{
id server;
float timeout = 0;
char c;
extern char *optarg;
while ((c = getopt(argc, argv, "t:?")) != -1)
switch (c)
{
case 'f':
timeout = atof(optarg);
break;
case '?':
usage();
}
server = [[NetTalkServer alloc] init];
[server setTimeOut:timeout];
[server run];
[server free];
exit(0);
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.