コード例 #1
0
ファイル: client.py プロジェクト: eas604/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})
コード例 #2
0
ファイル: client.py プロジェクト: 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,
        })
コード例 #3
0
ファイル: client.py プロジェクト: amjith/pymux-test
    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,
        })
コード例 #4
0
ファイル: posix.py プロジェクト: jonathanslenders/pymux
    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],
            })
コード例 #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],
            })