分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
Server:
- # server
- import socket
- address = ('127.0.0.1', 31500)
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # s = socket.socket()
- s.bind(address)
- s.listen(5)
- ss, addr = s.accept()
- print 'got connected from',addr
- ss.send('byebye')
- ra = ss.recv(512)
- print ra
- ss.close()
- s.close()