• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python socket._fileobject函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setup

 def setup(self):
     """
     We need to use socket._fileobject Because SSL.Connection
     doesn't have a 'dup'. Not exactly sure WHY this is, but
     this is backed up by comments in socket.py and SSL/connection.c
     """
     self.connection = self.request # for do_POST
     self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
开发者ID:diegotole,项目名称:passe-partout,代码行数:9,代码来源:SecureXMLRPCServer.py


示例17: setup

 def setup(self):
     self.log=logging.getLogger(__name__)
     self.application_root = "/copernicus"
     self.connection = self.request
     self.responseCode = 200
     self.set_cookie = None
     self.regexp = '^%s[/?]?'%self.application_root  #checks if a request is referring to application root
     self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
     self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
     self.request.revertSocket = False
开发者ID:ctk3b,项目名称:copernicus,代码行数:10,代码来源:request_handler.py


示例18: __init__

    def __init__(self, sock, client, args, logger=logging):
        self.connection = sock
        sock.settimeout(300)
        self.rfile = socket._fileobject(self.connection, "rb", self.rbufsize, close=True)
        self.wfile = socket._fileobject(self.connection, "wb", self.wbufsize, close=True)
        self.client_address = client
        self.args = args
        self.logger = logger

        self.setup()
开发者ID:Libor87,项目名称:XX-Net,代码行数:10,代码来源:simple_http_server.py


示例19: setup

        def setup(self):
                # added a try except block in case of transmission errors
                try:

                        self.connection = self.request
                        self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
                        self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)

                # except errors and pass them
                except: pass
开发者ID:djedidiamine,项目名称:social-engineer-toolkit,代码行数:10,代码来源:harvester.py


示例20: 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)
        
	def shutdown_request(self,request):
		request.shutdown()
	
	def shutdown(self, args=None):
         return self._con.shutdown()
开发者ID:nouafyve,项目名称:Transchiffrement-doc,代码行数:10,代码来源:server_https.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python socket.accept函数代码示例发布时间:2022-05-27
下一篇:
Python utils.OpenID类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap