lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] No TCP connection


From: Amir Bukhari
Subject: [lwip-users] No TCP connection
Date: Mon, 7 Nov 2005 11:36:55 +0100

I have initialized TCP and IP and setup a small HTTP server, but I didn't
got any connection from others computers. For example when I connect to it
from explorer I got an error indicating that no connection to host
available. Note that I can PING my host.

After I initialized my network, I create a thread

------------------------------------
static void
main_thread(void *arg)
{
        struct tcp_pcb *pcb;
  sys_sem_t sem;
  /*netif_set_default(netif_add(&ipaddr, &netmask, &gw, NULL,
sioslipif_init1,
                              tcpip_input)); */

  
  sem = sys_sem_new(0);
  tcpip_init(tcpip_init_done, &sem);
  sys_sem_wait(sem);
  sys_sem_free(sem);
  printf("TCP/IP initialized.\n");

  printf("Applications started.\n");
  
  /* Create a new TCP PCB. */
        pcb = tcp_new();
        /* Bind the PCB to TCP port 80. */
        tcp_bind(pcb, IP_ADDR_ANY, 80);
        /* Change TCP state to LISTEN. */
        pcb = tcp_listen(pcb);
        /* Set up http_accet() function to be called
        when a new connection arrives. */
        tcp_accept(pcb, http_accept);
    
  sys_timeout(5000, tcp_timeout, NULL);


  sem = sys_sem_new(0);
  sys_sem_wait(sem);
  
}
-------------------------

but my http_accept function never got called.

Thanks,
-Amir




reply via email to

[Prev in Thread] Current Thread [Next in Thread]