python socket编程5 - 最简单的命令行启动的tcp/udp server/client例子
一、TCP服务端和客户端1、server服务端fromsocketimport*serverPort=12000serverSocket=socket(AF_INET,SOCK_STREAM)serverSocket.bind(('',serverPort))serverSocket.listen(1)print('TCPserver已经启动...')whileTrue:print('服务器已经准