For program enthusiasts in the LAN users, if you can edit a local area communication program, how wonderful this will be! However, if you want to write a process from your head to your communication, you must have an in-depth understanding of the relevant network protocols and some of the other underlying technologies, this is not an easy thing. Now there is a Winsock control, everything is different, it has packaged all of the cumbersome technical details for you and provides a convenient way to access TCP and UDP network services. You can easily connect to a remote computer by setting the properties of the control and calling its method, and you can also exchange data two-way, and all this does not require you to understand the details of TCP or call low Winsock APIs. Winsock controls can be used by Microsoft Acess, Visual Basic, Visual C or Visual FoxPro developers. This article uses the Visual Basic 6 Enterprise Edition to develop the environment to introduce the preliminary application of Winsock control. Winsock controls can use two protocols: TCP protocols and UDP protocols, which are described below. The TCP protocol is a data transfer protocol that allows you to create and maintain a connection to a remote computer so that it can perform data transfer from each other. Use TCP protocol communication must establish a client application and server application, respectively. When creating a client application, you must know the server computer name or its IP address (existing in the RemoteHost property), and the server computer listening to the port (existing in the RemotePort property), then call the Connect method. When you create a server application, you should set a listening port accordingly and call the Listen method. When the client needs to connect (Connect), a ConnectionRequest event will occur. To complete the connection, you can call an Accept method in the ConnectionRequest event. After establishing a connection, any part of the computer can send and receive the other party data. If you want to send data, you need to call the SendData method. When the data is received, a DataArrival event occurs, and the GetData method in the DataArrival event can be invoked to obtain the data transmitted by the other party. Said so much, everyone may still not know, let me use the program to explain.