TAILIEUCHUNG - Internetworking with TCP/IP- P47

Internetworking with TCP/IP- P47: TCP/IP has accommodated change well. The basic technology has survived nearly two decades of exponential growth and the associated increases in traffic. The protocols have worked over new high-speed network technologies, and the design has handled applications that could not be imagined in the original design. Of course, the entire protocol suite has not remained static. New protocols have been deployed, and new techniques have been developed to adapt existing protocols to new network technologies | Sec. Connecting Sockets To Destination Addresses 419 Argument socket is the integer descriptor of the socket to connect. Argument destaddr is a socket address structure that specifies the destination address to which the socket should be bound. Argument addrlen specifies the length of the destination address measured in bytes. The semantics of connect depend on the underlying protocols. Selecting the reliable stream delivery service in the PFJNET family means choosing TCP. In such cases connect builds a TCP connection with the destination and returns an error if it cannot. In the case of connectionless service connect does nothing more than store the destination address locally. Sending Data Through A Socket Once an application program has established a socket it can use the socket to transmit data. There are five possible functions from which to choose send sendto sendmsg write and writev. Send write and writev only work with connected sockets because they do not allow the caller to specify a destination address. The differences between the three are minor. Write takes three arguments write socket buffer length Argument socket contains an integer socket descriptor write can also be used with other types of descriptors . Argument buffer contains the address of the data to be sent and argument length specifies the number of bytes to send. The call to write blocks until the data can be transferred . it blocks if internal system buffers for the socket are full . Like most system calls write returns an error code to the application calling it allowing the programmer to know if the operation succeeded. The system call writev works like write except that it uses a gather write form making it possible for the application program to write a message without copying the message into contiguous bytes of memory. Writev has the form writev socket iovector vectorlen Argument iovector gives the address of an array of type iovec that contains a sequence of pointers to

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.