Ejemplo n.º 1
0
    def _process_stdin(self):
        """
        Received data on stdin. Read and send to server.
        """
        with nonblocking(sys.stdin.fileno()):
            data = sys.stdin.read()

        self._send_packet({"cmd": "in", "data": data})
Ejemplo n.º 2
0
Archivo: client.py Proyecto: jean/pymux
    def _process_stdin(self):
        """
        Received data on stdin. Read and send to server.
        """
        with nonblocking(sys.stdin.fileno()):
            data = sys.stdin.read()

        self._send_packet({
            'cmd': 'in',
            'data': data,
        })
Ejemplo n.º 3
0
    def _process_stdin(self):
        """
        Received data on stdin. Read and send to server.
        """
        with nonblocking(sys.stdin.fileno()):
            data = sys.stdin.read()

        self._send_packet({
            'cmd': 'in',
            'data': data,
        })
Ejemplo n.º 4
0
    def _process_stdin(self):
        """
        Received data on stdin. Read and send to server.
        """
        with nonblocking(sys.stdin.fileno()):
            data = self._stdin_reader.read()

        # Send input in chunks of 4k.
        step = 4056
        for i in range(0, len(data), step):
            self._send_packet({
                'cmd': 'in',
                'data': data[i:i + step],
            })
Ejemplo n.º 5
0
    def _process_stdin(self):
        """
        Received data on stdin. Read and send to server.
        """
        with nonblocking(sys.stdin.fileno()):
            data = self._stdin_reader.read()

        # Send input in chunks of 4k.
        step = 4056
        for i in range(0, len(data), step):
            self._send_packet({
                'cmd': 'in',
                'data': data[i:i + step],
            })