lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] LPC1768/9 :: FreeRTOS 7.4 :: lwIP 1.4.1 :: TCP send/recv


From: Furiantes
Subject: [lwip-users] LPC1768/9 :: FreeRTOS 7.4 :: lwIP 1.4.1 :: TCP send/recv
Date: Mon, 10 Jun 2013 10:38:39 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Hello,

i have one more problem. My goal is:

- connect to server

loop
- send request (get request like /my_php?dataFrom=[something]&dataTo=[something])
- and wait for response
while(some termination)

I did this (code below), but a second request is never sent to server. First request id OK, i get the data in processes it ok. But at the second request, netconn_write it seems it never send it to a server anything (i watch with WireShark).

I tried to connect/disconnect, close - connect, but nothing worked.

So if please can anybody tell the correct procedure to send/recieve data TCP connection.

Thanks to anybody who will even read it.

Dan



resultCon = netconn_connect(xNetConn, &remote_ip, cdata->host_port_number );

    downloadBlock:
    xNetConn->recv_timeout = 30000;

sprintf(request_my_c, "GET /my_php/data.php?startB=%d&lenB=%d HTTP/1.1\r\nAccept: */*\r\nAccept-Language: sl\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\nHost: %d.%d.%d.%d:%d\r\nConnection: Close\r\n\r\n\0", transData,transDataLen,cdata->host_add[0],cdata->host_add[1],cdata->host_add[2],cdata->host_add[3] , cdata->host_port_number);


netconn_write(xNetConn, request_my_c, strlen(request_my_c), NETCONN_COPY);

    while (1)
    {

        resultRecv = netconn_recv(xNetConn, &buf);

        //process data
       //all blocks downloaded -> break
        //goto another block;

}

some code....



reply via email to

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