我们从Python开源项目中,提取了以下43个代码示例,用于说明如何使用gevent.socket._fileobject()。
def makefile(self, mode='r', bufsize=-1): """Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.""" self._makefile_refs += 1 # close=True so as to decrement the reference count when done with # the file-like object. return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn, banner=None): Greenlet.__init__(self) self.locals = locals self.desc = _fileobject(conn) self.banner = banner
def readline(self, *a): return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def __init__(self, locals, conn): Greenlet.__init__(self) self.locals = locals self.desc = _fileobject(conn)
def makefile(self, mode='r', bufsize=-1): self._makefile_refs += 1 return _fileobject(self, mode, bufsize, close=True)
def makefile(self, mode='r', bufsize=-1): """Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.""" if not PYPY: self._makefile_refs += 1 # close=True so as to decrement the reference count when done with # the file-like object. return _fileobject(self, mode, bufsize, close=True)