lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Checking whether the client is connected to the Server


From: Teckinal Greek
Subject: RE: [lwip-users] Checking whether the client is connected to the Server
Date: Tue, 31 Aug 2010 10:21:12 +0000




    Hi,
yesterday i forgot to attach the screen shot of how i configured this Software platform for my project, now I am resending it with the attachment. Hope that explains or else let me know! In the mean time I have switched over to lwIP RAW API and ported the code. Now what i can see is that the value of err = 0 in the below statement 

err = tcp_connect(pcb, &ServAddr, 7777, client_connected); 

and at the same time in the conditional statement  if(err == ERR_OK) is satisfied that means I got connected to my server.

But the problem arises with writing to the server with this block

static err_t client_connected(void *arg, struct tcp_pcb *pcb, err_t err)
{
    char string[] = "Hello!";
    LWIP_UNUSED_ARG(arg);

    if(err != ERR_OK)
    printf("\n client connected(): err argument not set to ERR_OK, but the value is %d\n", err);
    else
    {
         printf("\n client connected \n");
        tcp_sent(pcb, client_sent);
        tcp_write(pcb, string, sizeof(string), 0);
    }
    return err;
}

where I have asked the client to sending the string "Hello!" to the server. If it is sending to the server how can i find out that it is sending the data.

Please feel free to ask any more information you need in this case, since I am a newbie I may not have understood your previous questions correctly.

Regards,
Greek.



> Subject: RE: [lwip-users] Checking whether the client is connected to the Server
> From: address@hidden
> To: address@hidden
> Date: Tue, 31 Aug 2010 09:09:41 +0100
>
> On Mon, 2010-08-30 at 09:26 +0000, Teckinal Greek wrote:
> > Hi Kieran,netif = netif_ethernet_open(LWIP_1) - this function opens
> > the Ethernet connection on my FPGA board which is called Altium
> > Nanoboard 3000.Also this function uses the TCP/IP Networking context
> > whose ID is LWIP_1 this is set in my Software Platform of my project.
> > I am enclosing a screen shot of how I configured this Software
> > platform for my project.Regards,Greek
>
> Could you show us the source for that function?
>
> Kieran
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

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