//Free the socket pointer
free(socket_desc);
return 0;
}
Compile the file and run the server.
$gcc –o servernmt servermt.c
$./servermt
Use telnet to connect to the server as a client from other xterms.
Try running on different machines/xterms using following command:
telnet localhost 9999
SOC3010 OPERATING SYSTEMS
HOME ASSIGNMENT 3
FALL 2022
12.
Write a program using sockets to handle multiple clients on a server
(i.e., multiple clients should connect to the server and communicate by
exchanging the messages). You could have a multi-client chat session
with the server each client connecting to the same server and having a chat
session with the same server.
Provide the Screenshots of all the CHAT sessions of CLIENTS on
different machines connected to the MAIN SERVER machine.
**********************
Do'stlaringiz bilan baham: |