UNIX Network Programming Volume 1, Third Edition [Electronic resources] : The Sockets Networking API نسخه متنی

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

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

UNIX Network Programming Volume 1, Third Edition [Electronic resources] : The Sockets Networking API - نسخه متنی

Addison Wesley

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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


Exercises


4.1

In Section 4.4, we stated that the INADDR_ constants defined by the <netinet/in.h> header are in host byte order. How can we tell this?

4.2

Modify Figure 1.5 to call getsockname after connect returns successfully. Print the local IP address and local port assigned to the TCP socket using sock_ntop. In what range (Figure 2.10) are your system's ephemeral ports?

4.3

In a concurrent server, assume the child runs first after the call to fork. The child then completes the service of the client before the call to fork returns to the parent. What happens in the two calls to close in Figure 4.13?

4.4

In Figure 4.11, first change the server's port from 13 to 9999 (so that we do not need super-user privileges to start the program). Remove the call to listen. What happens?

4.5

Continue the previous exercise. Remove the call to bind, but allow the call to listen. What happens?

/ 450