Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Linux Socket Programming by Example PHẦN 8
Đang chuẩn bị liên kết để tải về tài liệu:
Linux Socket Programming by Example PHẦN 8
Trọng Hùng
73
51
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
dữ liệu sẽ đọc các byte còn lại "vui mừng", và bất kỳ dữ liệu theo byte khẩn cấp, nếu có tồn tại. Ngay cả khi dữ liệu out-of-band không được đọc trong các chức năng xử lý tín hiệu, chỉ có các byte 'vui mừng và dữ liệu nonurgent tiếp theo sẽ được đọc, nếu có. | data will read the remaining bytes rejoice and any data that follows the urgent byte if any exists. Even if the out-of-band data was not read in the signal handling function only the bytes rejoice and subsequent nonurgent data would be read if any. The d byte would be prevented from being returned in the normal in-band data because it has been identified as out-of-band data. Urgent Mode When tcp_stdurg 1 Space does not permit us to dwell on this case but a few comments are worthwhile. When tcp_stdurg 1 a strange thing often happens urgent mode is often entered and its corresponding urgent pointer is received without any corresponding urgent data to be read. If the urgent pointer happens to be at the end of the last data byte included within the packet then there might not be any following byte received. The urgent data byte might follow in a subsequent packet. For this reason when this mode of operation is used the recv 2 call with the MSG_OOB flag set does not necessarily return an out-ofband byte for TCP when the signal SIGURG is raised. Tip When tcp_stdurg 1 under Linux a recv 2 call will return the errno value EAGAIN when no urgent data is available to read. Some other UNIX implementations BSD UNIX for example return the errno value EWOULDBLOCK instead. To handle the situation where the urgent data byte was unavailable you must perform the following remember this applies only when tcp_stdurg 1 1. Record the SIGURG event in a flag say a variable named urg_mode 1 . 2. Return from your signal handler. 3. Continue to read in-band data within your application. 4. When the urg_mode value is true try to read some out-ofband data by using recv 2 and the and the MSG_OOB flag bit. 5. If step 4 yields data then set urg_mode 0 and return to normal processing. Repeat step 3. Linux Socket Programming by Example - Warren W. Gay 359 6. If step 4 does not yield any out-of-band data continue processing while leaving urg_mode set true. Repeat step 3. Again it must be emphasized .
TÀI LIỆU LIÊN QUAN
Hệ điều hành Linux - Bài 8: Lập trình mạng bằng socket
The Linux Network Administrators' Guide
Linux Socket Programming by Example PHẦN 1
Linux Socket Programming by Example PHẦN 2
Linux Socket Programming by Example PHẦN 3
Linux Socket Programming by Example PHẦN 4
Linux Socket Programming by Example PHẦN 5
Linux Socket Programming by Example PHẦN 6
Linux Socket Programming by Example PHẦN 7
Linux Socket Programming by Example PHẦN 8
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.