code: def _forward_inbound(self, channel):
          
          try:
              while True:
                  data = self._websocket.receive()
                  if not data:
                      return
                  data = json.loads(str(data))
                  if 'resize' in data:
                      channel.resize_pty(
                          data['resize'].get('width', 80),
                          data['resize'].get('height', 24))
                  if 'data' in data:
                      channel.send(data['data'])
          finally:
              self.close()
docs: Forward inbound traffic (websockets -> ssh)