I’m on

My web server program is now able to be connected to! Today was a pretty good day.

I was supposed to have a meeting with Tommi this morning but he was still sick so i worked in the classroom where Jerry helped the first year students.
I decided to add in some structs and functions from our previous classes where we made a simple Peer to Peer UDP chat. The most important thing i added from this was the struct client which contains a struct sockaddr_in which is the IP address of the client, two unsigned integers called timestamp and tick, and a socket.
The original server code only supports one client at the time and creates single instances of the variables needed in the main function. Since i need to be able to handle multiple requests i will have to make a list of clients and give them functions to add the values to each one. As of right now my program can take a request from a single client. My next plan is to use the request to send back a html page. Then to add all this into a loop which keeps checking for connections and sending back the page.
Oh, and what was the reason i was unable to connect to my own server before?
I needed to put the correct port at the end of the IP when trying to connect. Do’h!

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a comment