Unix™ Systems Programming [Electronic resources] : Communication, Concurrency, and Threads نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Unix™ Systems Programming [Electronic resources] : Communication, Concurrency, and Threads - نسخه متنی

Prentice Hall

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










21.6 Multicast Implementation of Radio Broadcasts


Copy UDPSendBcast.c into UDPSendMcast.c and compile it as UDPSendMcast. Modify UDPSendMcast to take a multicast address as an additional command-line argument. The port argument is now the multicast port for sending. The sender does not need to know anything about the receivers and does not have any direct contact with them. The sender's only responsibility is to send.

Copy UDPRecvBcast.c into UDPRecvMcast.c and compile it as UDPRecvMcast. Modify UDPRecvMcast to receive audio from UDPSendMcast. The first command-line argument of UDPRecvMcast is a multicast address, and the second command-line argument is a multicast port. The UDPRecvMcast program now only receives messages and does not send anything over the network.

Exercise 21.36

How would you incorporate into the receiver the ability to display a message indicating how far along the audio transmission is when it joins?

Answer:

The receiver can estimate the time from first sequence number of the first audio packet that it receives, given that eight sequence numbers corresponds to one second of audio.

Exercise 21.37

How does UDPRecvMcast behave under the four basic test cases?

Answer:

UDPRecvMcast behaves as the other UDP implementations did. The receiver loses data if it is suspended long enough, and the receivers are independent.


    / 276