TAILIEUCHUNG - Using Socket Servers

Sử dụng Socket Servers Một máy chủ socket là một ứng dụng có thể chấp nhận "ổ cắm" các kết nối. Ổ cắm kết nối được liên tục, có nghĩa là họ cho phép bạn vẫn kết nối với một máy chủ thay vì làm một kết nối chỉ cần đủ dài để tải về thông tin trước khi ngắt kết nối. | Using Socket Servers A socket server is an application that can accept socket connections. Socket connections are persistent which means that they let you remain connected to a server rather than making a connection just long enough to download information before disconnecting. Unlike a scripted page a socket server is an application that s always running. It can accept simultaneous connections from multiple computers and exchange information among them. While you re connected to a socket server you can send or receive information at any time. Using socket connections to continually transfer data to and from the server is how most chats and multiplayer games are created in Flash. A key principle to understand about using socket connections with Flash is that you don t have to request information to get information for example in a chat application a message can be pushed into Flash at any time without Flash having to ask for it. Introduction to the XMLSocket Class This section provides a basic introduction to Flash s built-in XMLSocket class. This discussion is simply a guide to the use of this built-in class so you can familiarize yourself with the general concepts needed for plugging your applications into nearly any socket server. The exercise that follows makes use of a special socket server that wraps most of the functionalities you re about to learn into a simple-to-use object. But more on this in a bit. Let s look at the inherent way Flash communicates with a socket server. Before you can connect a Flash movie to a socket server you must create a new XMLSocket object using the constructor for the XMLSocket class. You can then use the methods of the object to connect to a server and exchange information. In this section we ll show you how to create and use an XMLSocket object while also using the XML class methods and properties introduced earlier in this lesson. To create a new XMLSocket object you must use the constructor for XMLSocket. Here s an example .

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.