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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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










Chapter 14


14.1

If no handler had been set, the return from the first call to signal would be SIG_DFL and the call to signal to reset the handler would just set it back to its default.

14.3

Here is just the for loop:



for ( ; ; ) {
if ( (n = Recv(sockfd, recvline, MAXLINE, MSG_PEEK)) == 0)
break; /* server closed connection */
Ioctl(sockfd, FIONREAD, &npend);
printf("%d bytes from PEEK, %d bytes pending\n", n, npend);
n = Read(sockfd, recvline, MAXLINE);
recvline[n] = 0; /* null terminate */
Fputs(recvline, stdout);
}

14.4

The data is still output because falling off the end of the main function is the same as returning from this function, and the main function is called by the C startup routine as follows:



exit(main(argc, argv));

Hence, exit is called, plus the standard I/O cleanup routine is called.


/ 450