我将在esl项目中使用gevent lib。因为当我尝试PythonESL库时,在高每秒调用数测试中出现套接字错误。因此,参考这个github项目https://github.com/EvoluxBR/greenswitch,我试图读取套接字文件描述符并用gevent处理freeswitch事件。但我出错了,电话断了。我的代码如下:
from ibs_esl.esl_gevent import OutboundSession,OutboundESLServer
import gevent.socket as socket
fd = self.request.fileno()
con = socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM)
session = OutboundSession(self.client_address,con)
session.myevents()
session.linger()
session.receive_events()
我收到错误“gevent.OutboundSessionHasgoneway”
谢谢
目前没有回答
相关问题 更多 >
编程相关推荐