logo elektroda
logo elektroda
X
logo elektroda

ESP8266 connection: keep-alive. Do not close the connection to the client (HTTP)

marcin1301993 1158 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16882617
    marcin1301993
    Level 12  
    Hi, how do I make the HTTP support in the Arduino IDE so that the server does not close the connection to the client?
    My problem is that my server is a standard Web server which waits for GET requests, but when I connect to the server using A6 GPRS from AI Thinker before I send anything to the server it already closes the connection. If the connection had remained open until I closed it myself, I would have been able to solve the problem, because here it is written how to form an HTTP request http://www.tcpipguide.com/free/t_HTTPRequestMessageFormat-2.htm.
    The guy in this topic has covered this: https://forum.arduino.cc/index.php?topic=414466.msg2944902#msg2944902 but he didn't write how the situation looks on the server side. Does anyone have any ideas?

    If so, my code looks like this:
    Code: C / C++
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #2 16882888
    JacekCz
    Level 42  
    are you convinced that you are not lost in these "servers", and that you are using the server on the board at all?
    What you write in the text is nowhere near the code
  • #3 16882897
    marcin1301993
    Level 12  
    You mean that a Web Server is different from an HTTP Server? My "server" was only supposed to "receive" GET requests and display them in the console.
ADVERTISEMENT