-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
17 lines (11 loc) · 3.52 KB
/
README
File metadata and controls
17 lines (11 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
a. Full Name: Kaiqiang Zhang
b. Student ID: 5455325748
c. Firstly, I create the TCP connection between the servers and the client. In this way, the server can send the neighbor information to the client using the connection of TCP. Then I create the UDP connectiion between the servers and the client. In this way, the client can send all the servers connection situation and the cost to all the servers using the connection of the UDP.
d. (1) My code files are serverA.cpp, serverA.txt, serverA.h, serverB.cpp, serverB.txt, serverB.h,serverC.cpp, serverC.txt, serverC.h, serverD.
cpp, serverD.txt, serverD.h, client.cpp, client.h
(2) serverA.h, serverB.h, serverC.h, serverD.h, client.h are the head files.
serverA.cpp, serverB.cpp, serverC.cpp and serverD.cpp are C++ files, they include the TCP connection and the UDP connection. They send their neighbor information of servers to the client and receive all servers connection situation. client.cpp is the C++ file, including the TCP connection and the UDP connection. It receives the neighbor information of servers from the client and sends all servers connection situation to the servers.
(3) serverA.txt, serverB.txt, serverC.txt and serverD.txt are the files that include the neighbor information of the servers.
e. The TA should first compile and run the client.cpp. Then he or she should compile and run the files of serverA.cpp, serverB,cpp, serverC.cpp and serverD.cpp in order.
f. The server firstly transfer the neighbor information to the client usint the array and the client send the servers of different connection using the two-dimension array.
h. I learned the way of TCP connection and the UDP connection from "http://blog.csdn.net/sws9999/article/details/8139577" and "www.beej.us/guide/bgnet".