Write the programs using C++
Write the following programs using C++
NAME
MServer - Multicast-Chat Server. MClient- Multicast-Chat Client.
SYNOPSIS
MServer
MClient
DESCRIPTION
MServer:
- Creates a TCP server socket Sand binds it to sport =10992,
- Creates a UDP socket Uand binds it to sport.
- Generates a random multicast IP address I & port P in the range (10000 to 11000).
- Accepts connections on S from MClients.For each client connection it:
Displays its <hostname, Port> & sends it I and P
Sends <hostname, Port> out of U to the multicast group (I,P). Close the connection.
MClient:
- Creates a TCP socket S and connects it to the MServer and reads the values of I and P.
The client contacts to any server running at one of the something hosts and listening at sport. Let Ps be the port number of S.
- Creates a UDP socket Ur to receive the chat messages sent to the mcast group (I,P).
- Creates a UDP socket Us and binds it to Ps to send chat messages to the mcast group (I,P).
- Reads any message typed by the user and sends it to the mcast group (I,P) out of Us.
- Receive any message from Ur and display it proceeded by the sender’s <hostname, Port>.
- Exits when the user types CTRL-D.
Subjects List
Database (48)
Accounting (39)
Economics (34)
Finance (54)
Programming (122)
Management (69)
Marketing (25)
Report Writing (52)
Engineering (79)
Statistics (39)
Business Studies(45)
Case Studies (15)
Networking (26)
UML (9)
Science (23)
Nursing (11)
MATLAB (17)
Psychology (6)
Math (20)
Data Structure (9)
Python (15)
HRM (25)
IT (21)
Computer Science (57)
Law (4)
Essay (3)
Data Analysis (2)
Big Data (3)
Philosophy (2)
History (1)