Python:Socket-TCP通信
摘要:
from socket import *HOST = '172.24.0.17'PORT = 21567BUFSIZE = 1024ADDR = (HOST, PORT)tcpCliSock = socket(AF_INET, SOCK_STREAM)tcpCliSock.connect(ADDR)while True: data = input('>') if not data: break tcpCliSock.send(data) data = tcpCliSock.recv(BUFFSIZE) if not data: brea... 阅读全文
posted @ 2013-03-27 15:58 One|Piece 阅读(371) 评论(0) 推荐(0) 编辑