TAILIEUCHUNG - Web Client Programming with Perl-Chapter 4: The Socket Library- P2

Tham khảo tài liệu 'web client programming with perl-chapter 4: the socket library- p2', công nghệ thông tin, quản trị web phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 4 The Socket Library- P2 Now we wait for a response from the server. We read in the response and selectively echo it out where we look at the response header and data variables to see if the user is interested in looking at each part of the reply get the HTTP response line my the_response F print the_response if all defined response get the header data while F m A S s . print 1 2 n if all defined header get the entity body if all defined data print while F The full source code looks like this usr local bin perl -w socket based hypertext version of UNIX cat use strict use Socket module require routine require routine include Socket file with Open_TCP file with parseURL use vars qw opt_h opt_H opt_r opt_d use Getopt Std parse command line arguments getopts hHrd print out usage if needed if defined opt_h ARGV 0 help if it wasn t an option it was a URL while _ shift @ARGV hcat _ opt_r opt_H opt_d Subroutine to print out usage information sub usage print usage 0 -rhHd URL s n

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.