摘要
在网络通信中,Socket套接字明确了发送端到达接收端的有效途径.在网络传输层上建立通信关系,实现数据交互要求编程语言提供可操作的接口,而Socket套接字为接口的实现提供了可能.在基于TCP协议的Socket通信中,Java语言提供了ServerSocket类和Socket类用于网络编程.由于网络通信的复杂性,在建立了通信关系的前提下,必须引进线程机制处理通信细节,以便保证各节点通讯的独立和并发.深入理解线程的处理技巧,并将该结构灵活地应用到通信中是实现网络编程的关键.
In the network communication, Socket makes an effective way from sender to reciver. In order to establish the relation of communication and realize data interchange on the transport layer, programming language is required to provide operational interface, and Socket provides the possibility of realizing interface. In the communication based on TCP protocols, Java language provides ServerSocket class and Socket class used for network programming. Because of the complexity of network communication, thread mechanism must be adopted to handle the details after building the communication relation in order to ensure the independence and simultaneous operation of all communicated nodes. Understanding the handling skills of thread and putting it into application flexibly is the key to realize network programming.
出处
《兰州工业高等专科学校学报》
2010年第1期23-27,共5页
Journal of Lanzhou Higher Polytechnical College