TAILIEUCHUNG - TCP/IP Sockets in C# Practical Guide for Programmers phần 6

MyThreadClass: đường 29/03 để thông qua nhà nước với phương pháp chúng tôi sẽ được chạy như chủ đề của riêng mình, chúng tôi đặt các phương pháp trong lớp học riêng của mình, và vượt qua các biến nhà nước trong xây dựng lớp. Trong trường hợp này, nhà nước là lời chào chuỗi được in. | Wrapping Up 83 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 using System For Int32 ArgumentException using For IPEndPoint using For UdpClient class RecvUdp static void Main string args if 1 2 Test for correct of args throw new ArgumentException Parameter s Port encoding int port args 0 Receiving Port UdpClient client new UdpClient port UDP socket for receiving byte packet new byte IPEndPoint remoteIPEndPoint new IPEndPoint port packet ref remoteIPEndPoint ItemQuoteDecoderText decoder 2 Which encoding new ItemQuoteDecoderText args 1 new ItemQuoteDecoderText ItemQuote quote packet quote Wrapping Up We have seen how C data types can be encoded in different ways and how messages can be constructed from various types of information. You may be aware that the .NET framework includes serialization capabilities The and 84 Chapter 3 Sending and Receiving Messages name spaces contain classes that support writing a C class instance to an XML eXtensible Markup Language file binary format or SOAP Simple Object Access Protocol message suitable for sending over a network connection. Once at the remote host the file can be deserialized into a instance of that object. Similarly the name space allows the ability to create a remote proxy object that a client can use to invoke methods on a server s object. It might seem that having these interfaces available would eliminate the need for what we have described in this chapter and that is true to some extent. However it is not always the case for several reasons. First the encoded forms produced by Serializable may not be very efficient. They may include information that is meaningless outside the .

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.