FACT++  1.0
int main ( int  argc,
char **  argv 
)

Definition at line 686 of file webServer.c.

References did_init(), DNS_PORT, error_handler(), get_node_name(), handler(), LOG, log_it(), web_get_port(), and web_open_server().

687 {
688  int port;
689  int proto;
690  char dns_node[128];
691  int web_get_port();
692  char *ptr;
693  char currwd[256];
694 
695  if(argc){}
696 
697  strcpy(currwd, argv[0]);
698  printf("arg %s\n",currwd);
699  ptr = strrchr(currwd,'/');
700  if(ptr)
701  {
702  *ptr = '\0';
703  }
704  ptr = strrchr(currwd,'\\');
705  if(ptr)
706  {
707  *ptr = '\0';
708  }
709  chdir(currwd);
710  log_it(LOG,"webDid starting",argv[1],getpid());
711  /* setup the network socket */
712  proto = 1;
713  port = web_get_port();
714  get_node_name(dns_node);
715  did_init(dns_node, DNS_PORT);
716  if(!web_open_server("DID",handler, &proto, &port, error_handler))
717  return(0);
718 /*
719  ret = matchString("hello world","*ll*");
720  printf("%s %s %d\n", "hello world","*ll*",ret);
721  ret = matchString("hello world","ll*");
722  printf("%s %s %d\n", "hello world","ll*",ret);
723 */
724  while(1)
725  sleep(10);
726  return(0);
727 }
int web_get_port()
Definition: webTcpip.c:185
#define LOG
Definition: webServer.c:12
int web_open_server()
static void handler(int conn_id, char *packet, int size, int status)
Definition: webServer.c:635
static void error_handler(int conn_id, int severity, int errcode, char *reason)
Definition: webServer.c:672
int get_node_name(char *node_name)
Definition: utilities.c:33
#define DNS_PORT
Definition: dim.h:139
int did_init()
void log_it(int type, char *s1, char *s2, int conn_id)
Definition: webServer.c:55

+ Here is the call graph for this function: