@see MOREP_Send()
@see MOREP_Receive()
*/
-int MOREP_Connect (char *local_address, char *remote_address);
+int MOREP_Connect (char *url);
/**
@ingroup MOREP
/* linker: morep.o */
/* winlnk: morep.o */
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-#include <pthread.h>
#include <string.h>
-#include <unistd.h>
#include "debug.h"
#include "morep.h"
+char *progname = NULL;
+
int stop = 0;
void sig_handler (int sig)
{
VERBOSE (morep, TRACE, PRINTF ("morep_server\n"));
- int fd = MOREP_connect (url);
+ int fd = MOREP_Connect (url);
VERBOSE (morep, INFO, PRINTF ("server started at '%s'\n", url));
case 'v':
arg = (arg[2]) ? arg + 2 : (--argc > 0) ? *(++argv) : NULL;
if (arg == NULL) {
- VERBOSE (ERROR, fprintf (stderr, "%s: no directory name\n", progname));
+ VERBOSE (ERROR, fprintf (stderr, "%s: verbose level not specified\n", progname));
return usage (1);
}
CHANGE_VERBOSE_LEVEL (morep, atoi (arg));
break;
case 'h':
default:
- printf ("usage: %s [-h] [-v int] <url>\n");
+ printf ("usage: %s [-h] [-v int] <url>\n", progname);
return (c != 'h');
}
}