socket的send方法出现错误:
TypeError: a bytes-like object is required, not ‘str’
python 3.5 不能直接的传入字符串需要传入bytes-like 对象 ,需要对你使用字符串encode()方法
解决方法:
服务器端用encode
客户端用decode
socket的send方法出现错误:
TypeError: a bytes-like object is required, not ‘str’
python 3.5 不能直接的传入字符串需要传入bytes-like 对象 ,需要对你使用字符串encode()方法
解决方法:
服务器端用encode
客户端用decode