IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2007, 4:37:43 PM (19 years ago)
Author:
eugene
Message:

optionally use named sockets

Location:
trunk/Ohana/src/kapa2/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa2/src/CheckPipe.c

    r13479 r13899  
    77
    88// we can supply a port here, with only small changes
    9 void InitPipe () {
    10   InitSocket = KapaServerInit (&Address);
     9void InitPipe (char *namedSocket) {
     10
     11  if (namedSocket == NULL) {
     12    InitSocket = KapaServerInit (&Address);
     13  } else {
     14    sock = KapaWaitNamedSocket (namedSocket);
     15  }
    1116  return;
    1217}
  • trunk/Ohana/src/kapa2/src/Layout.c

    r13479 r13899  
    66  int N;
    77  Section *section;
     8  char *namedSocket;
     9 
     10  if ((N = get_argument (argc, argv, "-socket"))) {
     11    remove_argument (N, &argc, argv);
     12    namedSocket = argv[N];
     13    remove_argument (N, &argc, argv);
     14  }
    815
    9   InitPipe();
     16  // if we specify a named socket, wait until we are contacted
     17  // otherwise, open an INET sock and check occasionally for requests
     18  InitPipe (namedSocket);
    1019
    1120  ACTIVE_CURSOR = FALSE;
Note: See TracChangeset for help on using the changeset viewer.