Network Programming Project Report

Project Report 1155028688 Wang Cong Overview This project is a practice of Windows socket programming. In this program we need to complete the following things: 1. Establish a TCP connection to the server. 2. Create a TCP socket listening on a port for the ROBOT program. 3. Create a UDP socket for receiving packets 4. Send and receive messages via TCP sockets 5. Send and receive messages via UDP sockets 6. Compare the throughputs in different buffer sizes. This program is programmed by C++. Program Design I defined the following functions to complete the tasks: void OnError () This function is used to print an error message and call WSACleanup(). It is designed to simplify the clean-up steps when error occurred. * SOCKADDR_IN *CreateSocket (SOCKET &s, u_short port, int type = IPPROTO_TCP, bool isServer = false) This function will create a socket for TCP/UDP connection Parameters: s—-Reference to the socket port—-The port on which to create the connection type—-The connection type(TCP/UDP) isServer—-Set it true to establish a TCP server socket and make it to listen from the port, and false to establish a TCP client socket.

Return: return the SOCKADDR_IN pointer pointed to a SOCKADDR_IN object. NULL if any error occurred, and then the OnError() function will be called * Int sendTCP (SOCKET &s, const char *m) This function will send out a TCP message over the stream socket Parameters: s—-Reference to the socket m—-The message to be sent Return: SOCKET_ERROR if any error occurred. , else return bytes sent. * Int recvTCP (SOCKET &s, char *buffer, int len) This function will receive a TCP message from a stream socket Parameters: s—-Reference to the socket uffer—-The buffer to receive a message len—-The buffer length Return: SOCKET_ERROR if any error occurred or the buffer is a NULL pointer, else return bytes received These functions are designed in order to make the program more clearly. More detail is written in the program. Bonus Part: Testing The Relationship Between Throughput And Buffer Size Figure [ 1 ] Testing On Localhost Figure [ 2 ] Testing On 100M LAN Figure [ 3 ] Testing On 802. 11b Wireless Network We can see the following conclusions from the figures above: 1.

When testing on localhost, the throughput will increase when buffer size increases, and after a particular buffer size, the throughput will decrease 2. When testing on 100M LAN, the throughput will increase and approach the maximum speed(100Mbps) 3. When testing on Wireless Network, the throughput is relatively stable. Because the speed of wireless network is relatively slow. But the throughput is not reaching the highest speed, I think it is because of a higher delay than it was in LAN and localhost environment.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyhomeworkGeeks
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Business and administrative studies
excellent, got a 100
Customer 452773, May 17th, 2023
Criminal Justice
The paper was not accused of plagiarism and was written very well. I will let you know the grade once it is graded. Thank you
Customer 452671, April 26th, 2021
Business and administrative studies
excellent job thank you Your Score 166.25/ 175- A 1. Current Culture 15% of total grade 18.37 Criterion "1. Current Culture" has textual feedback Criterion Feedback I see interesting points, though, in general they are not about the culture.
Customer 452773, June 4th, 2023
Business and administrative studies
Excellent job
Customer 452773, March 17th, 2023
Psychology
Thank you!
Customer 452545, February 6th, 2021
English 101
IThank you
Customer 452631, April 6th, 2021
Business and administrative studies
Excellent work ,always done early
Customer 452773, February 21st, 2023
Sociology
THANK YOUUUUU
Customer 452591, March 18th, 2021
BUSINESS LAW
excellent job made a 93
Customer 452773, March 22nd, 2023
business
Great job
Customer 452773, February 13th, 2023
10th grade English
very good
Customer 452773, March 26th, 2023
Philosophy
Thank you
Customer 452811, February 17th, 2024
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Close

Sometimes it is hard to do all the work on your own

Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;

  • Dissertations and Thesis
  • Essays
  • All Assignments

  • Research papers
  • Terms Papers
  • Online Classes
Live ChatWhatsApp