(self)
Switch the current connection to be a "hijacked" aka raw stream: one
        where bytes just get naively proxied back and forth.
Switch the current connection to be a "hijacked" aka raw stream: one
        where bytes just get naively proxied back and forth.
Switch the current connection to be a hijacked aka raw stream : one where bytes just get naively proxied back and forth .
def _handleRawStream(self):
        """
        Switch the current connection to be a "hijacked" aka raw stream: one
        where bytes just get naively proxied back and forth.
        """
        def loseWriteConnectionReason(reason):
            # discard the reason, for compatibility with readConnectionLost
            self.transport.loseWriteConnection()
        self.father.transport.readConnectionLost = loseWriteConnectionReason
        directlyProvides(self.father.transport, IHalfCloseableProtocol)
        self.http = False
        self.father.transport.write(
            "HTTP/1.1 200 OK\r\n"
            "Content-Type: application/vnd.docker.raw-stream\r\n"
            "\r\n")
        def stdinHandler(data):
            self.transport.write(data)
        self.father.transport.protocol.dataReceived = stdinHandler
        self.setStreamingMode(True)
def _handleRawStream ( self ) : def loseWriteConnectionReason ( reason ) : # discard the reason, for compatibility with readConnectionLost self . transport . loseWriteConnection ( ) self . father . transport . readConnectionLost = loseWriteConnectionReason directlyProvides ( self . father . transport , IHalfCloseableProtocol ) self . http = False self . father . transport . write ( "HTTP/1.1 200 OK\r\n" "Content-Type: application/vnd.docker.raw-stream\r\n" "\r\n" ) def stdinHandler ( data ) : self . transport . write ( data ) self . father . transport . protocol . dataReceived = stdinHandler self . setStreamingMode ( True )