To write network communication code based on TCP/UDP,you must understand some network communication concepts such as IP address,port,socket,TCP/UDP protocols etc.This paper implemented a service API(Application Programming Interface) that encapsulate all network communication concepts and make TCP programming and UDP programming with the same mode.The results show that the API can make network communication programming very easily with no network concepts and supposes real-time and reliable communication and multi-NIC(Network Interface Card) in same host.%使用在TCP/UDP协议进行网络通信,会涉及IP地址、端口号、套接字、TCP/UDP协议等网络通信概念,而且TCP传输和UDP传输的编程模式是不同的,对网络通信概念进行了封装,实现了一个网络通信透明传输服务系统,且TCP传输和UDP传输具有相同的编程模式.使用表明,用户无需了解网络通信概念,即可使用该系统进行通信编程,使用极为方便,实现网络通信的实时传输、可靠传输和同一主机的多网卡支持.
展开▼