This week I got the wolfssl_tcpip code from Micro-chip running. This code establishes a HTTP server which can then be accessed. My task was to strip away all the extra codes in order to simplify the program. The code is base on Microchip’s code and uses some of the included libraries and functions. After the connection is established, you first have to open the socket and then wait for a signal and in the case of HTTPS, there needs to be a negotiation step to take care of all SSL related certificates and etc. The last 2 steps are to receive and transmit.

Why HTTP 1.1

HTTP 1.1 is being used mainly because of the number of available methods that can be used. There are 8 available methods that can be used for HTTP 1.1 as compare to only 3 for HTTP 1.0. HTTP 1.1 also allows more than one request/response on the same HTTP connection, which makes the connection more efficient.

I managed to simplify the code and it works perfectly for the first 3 steps: opening the socket, waiting for connection and negotiating the certs. However, it still does not work very well with receiving and transmitting data.

For debugging purposes I use; 1)curl, 2)openssl, in order to see exactly what is happening at each stage. They are very useful when it comes to understanding how the client and the server communicate.

Categories: Experiential


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.