摘要:
server:# -*- coding:gb2312 -*-import socketimport timeif __name__ == "__main__": s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) host='' p... 阅读全文
摘要:
server:# -*- coding:gb2312 -*-import socketimport timeimport structif __name__ == "__main__": s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) ... 阅读全文
摘要:
In [8]: b=b'hello'In [9]: type(b)Out[9]: builtins.bytesIn [10]: s='hello'In [11]: type(s)Out[11]: builtins.strTo convert from str to bytes, use str.encode().: In [12]: a=str.encode(s)In [13]: t... 阅读全文