(1) Basic outline
Now the system of the B / S structure is increasingly popular, but because the B / S system is based on HTTP protocol, this determines its defects in real-time applications. Because the server-side information has occurred to the client (the "push" technique that has been hot and a moment is not allowed to get new data to obtain new data. Then there is a problem here, how can the client know that the server-side data has changed? When will I ask the server to request new data? Now in the B / S, the solution is to request new data to the server through the timing refresh of the client browser, but there is a certain amount of time error, in some real-time systems, such as the production line monitoring, etc. I still don't meet the requirements, and the client will still issue a request for obtaining data when there is no data change in the server side, which increases the burden on the server and network transmission. However, in the C / S system, we can easily send changes to the Client end by the Server terminal when the data changes can via the SCOKET channel. But how do we use Scoket in B / S? We may think of using ActiveX controls, but this involves issues such as digital signatures, and the production process is also troublesome. In fact, Flash has provided us with an XMLSocket object to implement the client socket, allowing the browser that contains the flash application to establish a socket connection with the server, and then the Flash application can send XML data with the server, and in a Socket connection After establishing, the amount of data transmitted on this connection is not limited until the socket connection is turned off. Only the page on the page, the JavaScript on the page can be easily implemented, mutual control and call, so we can use Flash as a bridge to connect the web page and server socket communication on the browser, thereby achieving The server actively "push" the client's effect.
Next, we will introduce as an example with the socket and flash mx under .NET, which may be used for the SQL Server 2000, the web server is IIS6.0, web technology uses ASP.NET technology, language is C #.