Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduction In this homework students are required to implement two simple applications that use socket to communicate with a remote server. Using Cor C++ for
Introduction In this homework students are required to implement two simple applications that use socket to communicate with a remote server. Using Cor C++ for the programing languages: C/C++. Remote server The address of the remote server referred in the rest of instruction is segmentationfault.coredumped.tech. Part 1 TCP Socket Implement a simple program that use a TCP socket to communicate with a remote server. Follow the instructions listed below: 1 Send your lastname.# to remote server with TCP socket. Port number: 12345. example code: socket.send("buckeye.1") 2 Receive a string from the remote server example code: received = socket.recv(4096) Put the codes you use for step 1 and 2 in a script named top.socket.c. Make sure your script compiles and runs in terminal. C/C++ gcc top socket.c -o top socket; ./tcp socket Part 2 UDP Socket Implement a simple program that use a UDP socket to communicate with a remote server. Follow the instructions listed below. 1 Send the string you received from part 1 to remote server with UDP socket. Port number: 54321. example code: S.sendto"202fc9e9-48ea-409f-b72f-246eea4e537d", (host address, port#)) 2 Receive a confirmation from the remote server, which indicates that you have finished both part 1 and part 2 of this project. example code: s.recyfrom(4096) Put the codes you use for step 1 and step 2 in a script named udp socket.c. Make sure your script compiles and runs in terminal. C/C++ gec udp_socket.c -o udp socket; -/udp_socket Environment You can test your program on student stdlinux, if your program compiles and runs correctly on stdlinux. Submission Submit following files in an archive file (no folder is needed)|| 1 topsocket.c 2 udp socket.c 3 Readme In the Readme, include instructions (compiler versions and other information) to run your program Introduction In this homework students are required to implement two simple applications that use socket to communicate with a remote server. Using Cor C++ for the programing languages: C/C++. Remote server The address of the remote server referred in the rest of instruction is segmentationfault.coredumped.tech. Part 1 TCP Socket Implement a simple program that use a TCP socket to communicate with a remote server. Follow the instructions listed below: 1 Send your lastname.# to remote server with TCP socket. Port number: 12345. example code: socket.send("buckeye.1") 2 Receive a string from the remote server example code: received = socket.recv(4096) Put the codes you use for step 1 and 2 in a script named top.socket.c. Make sure your script compiles and runs in terminal. C/C++ gcc top socket.c -o top socket; ./tcp socket Part 2 UDP Socket Implement a simple program that use a UDP socket to communicate with a remote server. Follow the instructions listed below. 1 Send the string you received from part 1 to remote server with UDP socket. Port number: 54321. example code: S.sendto"202fc9e9-48ea-409f-b72f-246eea4e537d", (host address, port#)) 2 Receive a confirmation from the remote server, which indicates that you have finished both part 1 and part 2 of this project. example code: s.recyfrom(4096) Put the codes you use for step 1 and step 2 in a script named udp socket.c. Make sure your script compiles and runs in terminal. C/C++ gec udp_socket.c -o udp socket; -/udp_socket Environment You can test your program on student stdlinux, if your program compiles and runs correctly on stdlinux. Submission Submit following files in an archive file (no folder is needed)|| 1 topsocket.c 2 udp socket.c 3 Readme In the Readme, include instructions (compiler versions and other information) to run your program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started