Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

Write one TCP socket program, confServer.cpp, using select( ) to hold an internet conference for remote users (up to 4 users plus the server).

Note: The data format for sending/receiving is 4 bytes for length of message followed by the message. For example: if you want to send out a message "Hello World" which has 11 characters, you should send out the message in this format: " 11Hello World". The first 4 bytes are " 11". When display the message, do not display the message length.

For the server (confServer.cpp), it hosts the conference: 

when a remote machine (assume its name is Snoopy) requests for connection: 
establishes the connection if there are currently less than 4 clients connected excluding this new one (i.e., a conference can have at most 4 clients at the same time) sends a message: "Welcome, your name please:" 
waits for the first message from this client. (The first message from the client is her/his name. The server can assume that different clients will provides different names) broadcasts "Server: Welcome ClientName." (e.g., "Server: welcome Snoopy.") to all connected clients (including the new connected one). 
if there are 4 client-connections excluding this new one, server sends message to this new client "Sorry, but it is full", and disconnects the connection. 
when a client (say "Snoopy") sends message to server: 
broadcasts this message to every one (including the sender) in the format: Client: Message. (For example, "Snoopy: ruff, ruff.") 
when server has a message (the host can type some words to send to all clients) 
broadcasts this message to every one in the format: Server: Message. 
when a client (say "Snoopy") disconnected: 
broadcasts "Snoopy has logged out" to every one. 

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M9639902

Have any Question?


Related Questions in Computer Network & Security

The software company niksoft is selling a new defense

The software company NikSoft is selling a new defense against DDoS attacks. Their software looks at the source IP address on all incoming packets, and if it finds any IP address that accounts for more than 1% of traffic ...

Objectivespart 1 researching network attacks- research

Objectives Part 1: Researching Network Attacks - Research network attacks that have occurred. - Select a network attack and develop a report for presentation to the class. Part 2: Researching Network Security Audit Tools ...

Question 1 for rsa encryption we need a modulus that is the

Question : 1. For RSA encryption we need a modulus that is the product of two prime numbers, p and q. Assume p = 11 and q = 13, and thus n = p*q = 143. In this case, the RSA encryption exponent e must be relatively prime ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Buffer overflowthe common vulnerabilities and exposures cve

Buffer overflow The "Common Vulnerabilities and Exposures" (CVE) is a list of cybersecurity vulnerabilities that have been discovered, and they are collected in a database for everyone to see and improve or patch their s ...

Network project management assignment -purpose of the

Network Project Management Assignment - Purpose of the assessment - The purpose of this assignment is to build a clear understanding of project management fundamentals and their application, specifically: demonstrate pro ...

Question suppose you work in a network security company and

Question: Suppose you work in a network security company, and you need to prepare a survey report of a particular security issue of wireless networking. To start with, select an area of wireless network security. We have ...

Discussion bulldefine a packet analyzer and describe its

Discussion: • Define a packet analyzer and describe its use • List commonly used packet analyzers (beyond WireShark) • List best practices for analyzing packets • Describe uses (good and bad, ie. hacker) of a packetanaly ...

Question snmp initially appeared in 1988 but it did not

Question : SNMP initially appeared in 1988, but it did not receive widespread adoption. What have been the issues with SNMP, and have they been addressed? How widely used is SNMP now? Find some examples of tools that use ...

Question 12326 packet tracer - configuring pap and chap

Question 1 2.3.2.6 Packet Tracer - Configuring PAP and CHAP Authentication Submit your answer as Q1.pka Question 2 2.5.1.2 Packet Tracer - Skills Integration Challenge Submit your answer as Q2.pka Question 3 3.4.2.4 Pack ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As