我有以下报价似乎工作正常:
from cPickle import *
class Clientthread(threading.Thread):
def __init__(self,clientsocket, mystring):
self.client = clientsocket
self.clients = [clientsocket]
self.testEntity = entity.Entity(position = [1,7])
self.testTosend = dumps(self.testEntity,2)
self.client.send(self.testTosend)
但是,当我尝试反序列化整个东西时
news=self.s.recv(1024)
realnews = loads(news)
我在使用负载的行中收到 EOF 错误。知道这可能来自哪里吗?