title: Making an HTML page communicate with a socket in C
body: <p>I am working on a project for my studies, which consists in programming a small "Twitter-like" thing, which goal is to work with sockets and network in C. The idea is that you boot up a server executable, then you can use a client executable to connect to the server.</p>
  
  <p>Once connected (in the terminal), you can use a selection of commands to follow a new user, display all tweets from people you follow, and so on.</p>
  
  <p>Now, one bonus goal of this project is to create a web interface for this. Instead of using the terminal, as the client, you use a web browser. I managed to make the server display "Welcome on blahblah, enter your login" on the webpage, but then, I don't know how the client can interact with the page, to send info to the server.</p>
  
  <p>I imagine I'd have to create a HTML page with some forms, to send data. Now, the issue is, how can I send these data to my server's socket ? Ideally, I would like to simply send something like "ALL" to the server, just like a client in the terminal would do, and for the server to send back to the client (in this case the web browser) the response.</p>
  
  <p>So my goal is to simulate the kind of message the terminal would send, so that I don't have to fully write a second set of commands, and can use the ones already implemented.</p>
  
  <p>I've searched the lot, and I'm mainly disappointed. The only way I found to do that would be using Websockets in js. The problem is that they use special kind of secured communications, that are absolutely not compatible with my current socket, which is very "barebone". What could you advise ? How could I, from my HTML page, establish a connexion with the socket, and then send data to the socket ? As well as receive them ? Of course, no libraries or frameworks are allowed.</p>