code: def request_port_forward(self, address, port, handler=None):
          
          if not self.active:
              raise SSHException('SSH session not active')
          address = str(address)
          port = int(port)
          response = self.global_request('tcpip-forward', (address, port), wait=True)
          if response is None:
              raise SSHException('TCP forwarding request denied')
          if port == 0:
              port = response.get_int()
          if handler is None:
              def default_handler(channel, (src_addr, src_port), (dest_addr, dest_port)):
                  self._queue_incoming_channel(channel)
              handler = default_handler
          self._tcp_handler = handler
          return port
docs: Ask the server to forward TCP connections from a listening port on
          the server, across this SSH session.
  
          If a handler is given, that handler is called from a different thread
          whenever a forwarded connection arrives.  The handler parameters are::
  
              handler(channel, (origin_addr, origin_port), (server_addr, server_port))
  
          where C{server_addr} and C{server_port} are the address and port that
          the server was listening on.
  
          If no handler is set, the default behavior is to send new incoming
          forwarded connections into the accept queue, to be picked up via
          L{accept}.
  
          @param address: the address to bind when forwarding
          @type address: str
          @param port: the port to forward, or 0 to ask the server to allocate
              any port
          @type port: int
          @param handler: optional handler for incoming forwarded connections
          @type handler: function(Channel, (str, int), (str, int))
          @return: the port # allocated by the server
          @rtype: int
  
          @raise SSHException: if the server refused the TCP forward request