This project allows students learn how a web server and web client work, and learn how to design a web server. Although this project requires an understanding of TCP socket programming, it provides the students a sample code to start.
Activity 1: Use a web browser, e.g., Internet Explorer or Chrome to connect to instructor’s web site: [login to view URL] Fetch the tar file [login to view URL] and store it in your working directory, e.g., project1/. And then extract files from [login to view URL] to your working directory. You will see five subdirectories in your working directory after the extraction but you only need these three: h, api and apps. h directory contains header files; api directory contains functions that are used by applications; and apps directory contains application programs. Ignore other subdirectories and files.
Activity 2: Compile the source code in Visual Studio2008/[login to view URL] (Note: If you are using a different version of the socket interface, you may need to slightly modify the program. The following procedures may also be different if you are using another C++ package):
Build the web client:
At the very top of the Solution Explorer window, right click the Solution and Add->Add New Project. Select “Managed C++ Empty” in the list. Then select the proper location in the “Location” field and type a name, say “client” in the “Name” filed. Click on “OK”. Then add “webclient.c” in apps directory to Source Files. Also add all files in the api directory to Source Files. Then add all files in the h directory to Header Files.
In the Solution Explorer window, right click on the name of the project, select “Properties”. Then choose C/C++ -> General ->Additional Include Directories. Click on the field and choose the location of the h directory which you extracted in Activity 1.
Configure the linker: Click on “client” in the Solution Explorer window and select “Properties”, then click on Linker->General. Change the output file to “$(OutDir)/[login to view URL]”. Under Linker->Input->Additional Dependencies, add ws2_32.lib.
Build webclient.exe.
Build the web server: Follow the same steps for building the web client (by replacing "webclient.c" by "webserver.c"), except that you must also include source file “readln.c” (located in apps folder) in your project.
Activity 3: Read apps/webserver.c to learn how to run webserver. Also, you must run webserver in command line interface. Run the webserver in apps directory, type:
webserver 8080
Activity 4: Read apps/webclient.c to learn how to run webclient. You must run webclient in command line interface. Run webclient in the same directory (in another window) to get the web page:
webclient localhost / 8080
webclient localhost /time 8080
webclient [login to view URL] /
See what show up in the screen. Then, use Internet Explorer or Chrome to get the page: invoke the browser and then type http://localhost:8080/ and http://localhost:8080/time in the address pane. See what show up in the window.
Activity 5: Use another computer to read the web page. Firstly, use ifconfig (Linux) or ipconfig (Windows) to find out the IP address of the machine where webserver is running:
ifconfig –a on Linux, or
ipconfig on Windows
Hi, I have read the requirements and I would like to do this project if given the opportunity. I am a computer science practitioner and having the "C and Algorithms Certification Badge" in my profile gives me confidence and assurance that I can deliver you the project as required. Let me know if you are interested so I can have further details besides what was posted. Thanks.
I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used c++ to make many great projects, for example, I made the tools which can convert java files to c++ scripts which has the same effect, of course garbage collection included. I also made our own mobile game using c++, I even can show you the demo of client. Trust me, please let expert help you.
Hi,
I have over 2 years of experience in network programming and I think that I will be a perfect candidate for the job. I can complete a project in 4 days.
If you have any questions, don't hesitate to ask me.
Best regards,
ZMI
I have read and understand your requirements
Please open chat to discuss further..
+++++++++===========================++++++++++++++++==============================+++