基于Python的套接字编程  被引量:2

Socket Programming Based on Python

在线阅读下载全文

作  者:康梅娟[1] 郭状先 KANG Meijuan;GUO Zhuangxian(Linyi University,Linyi,Shandong Province,276000 China)

机构地区:[1]临沂大学,山东临沂276000

出  处:《科技资讯》2023年第3期6-9,共4页Science & Technology Information

摘  要:该文介绍了如何使用Python开发基于TCP协议和UDP协议的聊天程序,使发送程序和接收程序能够接收键盘输入并彼此之间相互发送数据,并阐述了套接字的概念、套接字的分类、Python中的socket模块、Python中用于套接字编程的重要方法,并分别举例说明了网络中的主机使用TCP套接字和UDP套接字进行通信的流程以及如何使用Python实现TCP套接字编程和UDP套接字编程。This paper introduces how to use Python to develop a chat program based on TCP protocol and UDP protocol, so that the sender and receiver can receive keyboard input and send data to each other. It also describes the concept of sockets, the classification of sockets, the socket module in Python, and the important methods for socket programming in Python. Examples are given to illustrate the process of using TCP sockets and UDP sockets to communicate with hosts in the network, and how to use Python to implement TCP socket programming and UDP socket programming.

关 键 词:PYTHON 套接字 TCP UDP 网络编程 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象