[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Re connect HTTP
From: |
H.A. |
Subject: |
Re: [lwip-users] Re connect HTTP |
Date: |
Tue, 14 Aug 2012 05:03:06 -0700 (PDT) |
I do have this code before the reconnect. It is probably relevant
//
// Avoid repeated connect
//
if(pState->eTCPState == STATE_TCP_CONNECTING)
return;
Am I in the wrong context for the stellaris port?
H.A. wrote:
>
> I still can't get this to work. I open a "telnet like" raw connection to a
> server on port 80 and send a string. It works but after 10 seconds the
> server shuts down the connection. The telnetReceive detects this and tears
> down the connection completely, reopens the connection. Each time 7 empty
> packets are sent every 10 seconds. It works but with many devices this can
> generate a lot of traffic.
>
> What I'm trying to do is to remove the open in the telnetReceive and
> reconnect only when i need inside the telnethandler which is called from
> the lwIPHostTimerHandler. According to Dave Wilson that should be the
> right context when working with the Stellaris port. In fact this is the
> only function called from this timer sice I have removed UPNP. My idea is
> the the TelnetHandler should sort of poll the status of the connection and
> send the data when connected.
>
> Tried many different ways but nothing works. Am I doing something
> completely wrong?
> This code is placed at the end of the TelnetHandler. Can't even see a SYN
> in Wireshark.
> This is not the serial interrupt handler as I incorrectly stated before.
> It reads the serial
> ringbuffer.
>
> //
> // Reconnect port 1 if required.
> //
> if(pState->eTCPState != STATE_TCP_CONNECTED)
> {
> TelnetOpen(pState->ulTelnetRemoteIP, pState->usTelnetRemotePort,
> pState->usTelnetLocalPort, 1);
> // TelnetOpen(g_sParameters.sPort[1].ulTelnetIPAddr,
> // g_sParameters.sPort[1].usTelnetRemotePort,
> // g_sParameters.sPort[1].usTelnetLocalPort,1);
> return;
> }
>
> // Put string into the TCP buffer.
> tcp_write(pState->pConnectPCB, pucTemp, strlen((char *)pucTemp), 1);
>
> // Flush the data that has been written into the TCP output buffer
> tcp_output(pState->pConnectPCB);
> pState->ulLastTCPSendTime = g_ulSystemTimeMS;
> bRxMsgFlag = false; // Clear some stuff for next time
> ucRxIndex = 0;
>
>
--
View this message in context:
http://old.nabble.com/Reopening-LWIP-for-new-HTTP-message-tp34265577p34296381.html
Sent from the lwip-users mailing list archive at Nabble.com.
- Re: [lwip-users] Re opening LWIP for new HTTP message, (continued)
- Re: [lwip-users] Re opening LWIP for new HTTP message, dawilson, 2012/08/08
- Re: [lwip-users] Re opening LWIP for new HTTP message, H.A., 2012/08/08
- [lwip-users] Linkedin - Networking (attention off topic), Funk, Artur, 2012/08/08
- Re: [lwip-users] Linkedin - Networking (attention off topic), Richard Barry, 2012/08/08
- [lwip-users] Fwd: Re: Linkedin - Networking (attention off topic), FreeRTOS Info, 2012/08/08
- Re: [lwip-users] Fwd: Re: Linkedin - Networking (attention off topic), Funk, Artur, 2012/08/08
- Re: [lwip-users] Linkedin - Networking (attention off topic), Simon Goldschmidt, 2012/08/08
- Re: [lwip-users] Linkedin - Networking (attention off topic), H.A., 2012/08/09
- Re: [lwip-users] Re connect HTTP,
H.A. <=
- Re: [lwip-users] Re connect HTTP, H.A., 2012/08/17
- Re: [lwip-users] Re connect HTTP, Simon Goldschmidt, 2012/08/19
- Re: [lwip-users] Re connect HTTP, H.A., 2012/08/20
- Re: [lwip-users] Re connect HTTP, Simon Goldschmidt, 2012/08/20
- Re: [lwip-users] Re connect HTTP, Kieran Mansley, 2012/08/24