EndpointProcessor.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:lc_cloud 作者: refractionPOINT 项目源码 文件源码
def __init__( self, parent, socket ):
        self.parent = parent

        # A simple connection header sent by the proxy before the connection
        # content, it encapsulates the original connection source information.
        self.address = msgpack.unpackb( socket.recv( struct.unpack( '!I', socket.recv( 4 ) )[ 0 ] ) )
        self.parent.log( 'Remote address: %s' % str( self.address ) )

        try:
            socket = parent.sslContext.wrap_socket( socket, 
                                                    server_side = True, 
                                                    do_handshake_on_connect = True,
                                                    suppress_ragged_eofs = True )
        except:
            raise DisconnectException
        self.s = socket
        self.aid = None
        self.lock = Semaphore( 1 )
        self.r = rpcm( isHumanReadable = True, isDebug = self.parent.log )
        self.r.loadSymbols( Symbols.lookups )
        self.connId = uuid.uuid4()
        self.hostName = None
        self.int_ip = None
        self.ext_ip = None
        self.tags = []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号