当前位置: 首页>>代码示例>>Python>>正文


Python socket._fileobject函数代码示例

本文整理汇总了Python中socket._fileobject函数的典型用法代码示例。如果您正苦于以下问题:Python _fileobject函数的具体用法?Python _fileobject怎么用?Python _fileobject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_fileobject函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup

 def setup(self):
     """Override SocketServer.StreamRequestHandler.setup."""
     self.connection = self.request
     self.rfile = memorizingfile.MemorizingFile(
             socket._fileobject(self.request, 'rb', self.rbufsize),
             max_memorized_lines=self._MAX_MEMORIZED_LINES)
     self.wfile = socket._fileobject(self.request, 'wb', self.wbufsize)
开发者ID:simudream,项目名称:galaktia,代码行数:7,代码来源:standalone.py

示例2: setup

 def setup(self):
     if self.server.cert_file:
         self.connection = self.request
         self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
         self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
     else:
         WSGIRequestHandler.setup(self)
开发者ID:LittleForker,项目名称:ajenti,代码行数:7,代码来源:standalone.py

示例3: setup

    def setup(self):
        self.connection = self.request
        self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
        self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
	
	print self.rfile
	print self.wfile
开发者ID:pixi-main-devs,项目名称:Super-Adventure-Club,代码行数:7,代码来源:sslserver2.py

示例4: setup

 def setup(self):
     self.connection = self.request
     self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
     #トランザクションログ・トランザクションデータログ用のロガー
     self._logger = logging.getLogger('vhut.tran')
     self._logger_data = logging.getLogger('vhut.trandata')
开发者ID:kuenishi,项目名称:vHut,代码行数:7,代码来源:xmlrpc.py

示例5: makefile

 def makefile(self, mode='r', bufsize=-1):
     self.__makefile_refs += 1
     try:
         return socket._fileobject(self, mode, bufsize, close=True)
     except TypeError:
         # Python 2.2 compatibility hacks.
         return socket._fileobject(self, mode, bufsize)
开发者ID:SunilMohanAdapa,项目名称:PySocksipyChain,代码行数:7,代码来源:__init__.py

示例6: __init__

 def __init__(self, sock, client, args):
     self.connection = sock
     self.rfile = socket._fileobject(self.connection, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.connection, "wb", self.wbufsize)
     self.client_address = client
     self.args = args
     self.setup()
开发者ID:sun3596209,项目名称:XX-Net,代码行数:7,代码来源:simple_http_server.py

示例7: setup

 def setup(self):
     """Setup the connection."""
     self.connection = self.request
     if trace: print 'SETUP', self.connection
     self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
     if trace: print 'AFTER', self.rfile, self.wfile
开发者ID:jowolf,项目名称:evirt,代码行数:7,代码来源:SecureJSONRPCServer.py

示例8: setup

	def setup(self):
		self.connection = self.request
		if self.server.sslOpts:
			self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
			self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
		else:
			self.rfile = self.connection.makefile('rb', self.rbufsize)
			self.wfile = self.connection.makefile('wb', self.wbufsize)	
开发者ID:m3z,项目名称:ToMaTo,代码行数:8,代码来源:rpcserver.py

示例9: __init__

    def __init__(self, sock, client, args):
        self.conn = sock
        self.rfile = socket._fileobject(self.conn, "rb", -1)
        self.wfile = socket._fileobject(self.conn, "wb", 0)
        self.client_address = client

        self.read_buffer = ""
        self.buffer_start = 0
开发者ID:LawyerWebber,项目名称:XX-Net,代码行数:8,代码来源:proxy_handler.py

示例10: setup

 def setup(self):
   self.suppress_body = False
   if self.server.enable_ssl:
     self.connection = self.request
     self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
   else:
     SimpleXMLRPCRequestHandler.setup(self)
开发者ID:SunilMohanAdapa,项目名称:pagekite,代码行数:8,代码来源:httpd.py

示例11: setup

	def setup(self):
		"""initial connection setup, setting rfile, wfile, and connection"""
		if hasattr(self.request, 'do_handshake'): #ssl mode
			self.connection = self.request
			self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
			self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
		else:
			httpserver.BaseHTTPRequestHandler.setup(self)
开发者ID:saggim,项目名称:SleekPubsub,代码行数:8,代码来源:httpd.py

示例12: makefile

 def makefile(self, mode='rb', bufsize=-1):
     log.debug('self.socket = %s, mode = "%s", bufsize = %d',
               self.socket, mode, bufsize)
     if not six.PY3:
         return socket._fileobject(self, mode, bufsize)
     else:
         # FIXME This is nonsense, I know, it is here just as filling
         return socket._fileobject(self, mode, bufsize)
开发者ID:rodrigc,项目名称:m2crypto,代码行数:8,代码来源:Connection.py

示例13: setup

 def setup(self):
     self.connection = self.request
     if self.timeout is not None:
         self.connection.settimeout(self.timeout)
     if self.disable_nagle_algorithm:
         self.connection.setsockopt(socket.IPPROTO_TCP,
                                    socket.TCP_NODELAY, True)
     self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
开发者ID:zanethorn,项目名称:api-ninja,代码行数:9,代码来源:server.py

示例14: setup

  def setup(self):
    if self.server.config.get('server', 'https') == '1':
      self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
      self.wfile = socket._fileobject(self.request, "wb", self.wbufsize) 
    else: 
      SocketServer.StreamRequestHandler.setup(self)

    # wrap the wfile with a class that will eat up "Broken pipe" errors
    self.wfile = _SocketWriter(self.wfile)
开发者ID:plux,项目名称:edna,代码行数:9,代码来源:edna.py

示例15: setup

 def setup(self):
   self.connection = self.request
   if self.server.is_https:
     # TODO(user): SSL.Connection.makefile() raises NotImplemented - why?
     self.rfile = socket._fileobject(self.request, 'rb', self.rbufsize)
     self.wfile = socket._fileobject(self.request, 'wb', self.wbufsize)
   else:
     self.rfile = self.connection.makefile('rb', self.rbufsize)
     self.wfile = self.connection.makefile('wb', self.wbufsize)
开发者ID:angvp,项目名称:gord,代码行数:9,代码来源:service.py


注:本文中的socket._fileobject函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。