Q3) Create a server-client program as follow: 1. Server: (16 Marks) a. The server will listen for connection from the cl

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Q3) Create a server-client program as follow: 1. Server: (16 Marks) a. The server will listen for connection from the cl

Post by answerhappygod »

Q3 Create A Server Client Program As Follow 1 Server 16 Marks A The Server Will Listen For Connection From The Cl 1
Q3 Create A Server Client Program As Follow 1 Server 16 Marks A The Server Will Listen For Connection From The Cl 1 (162.16 KiB) Viewed 19 times
Q3) Create a server-client program as follow: 1. Server: (16 Marks) a. The server will listen for connection from the clients. b. Upon connection, the server will receive a message from the client. c. If the message is "exit", the server will end the connection with this client. d. For any other message, the server will create a thread, and then send the message to be handled by this thread. The threads will perform the following actions: i. If the messages is "listdir", the server will list all files and directories in current working directory and send the results to the client. ii. If the messages is "abspath", the server will send the absolute path of the current working directory to the client. iii. If the messages is "chdir", the server will ask the client to send another option (which must contain the target directory). Then, the server should change the current working directory to the target directory. iv. If the messages is "makedirs", the server will ask the client to send another option (which must contain the target directory). Then, the server should change the current working directory to the target directory. using TCP connection a. The client should connect to the server b. The client can choose between the four options: "listdir", "abspath", "chdir", "makedirs" or "exit" to finish the connection. c. If the client receives "send your message" then send your name as a message to the server 2. Client
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply