# circuits.node.client module

class circuits.node.client.Client(*args, **kwargs)

  Bases: `BaseComponent`

  Node Client (peer)

  Create new connection for a node.

  Parameters:

    - hostname (str) – hostname to connect.

    - port (int) – port to connect.

    - channel (str) – An optional keyword argument which if defined, set channel used for node event. Default: `node_client`

    - receive_event_firewall (method) – An optional keyword argument which if defined, function or method to call for check if event is allowed for sending. Default: `None` (no firewall)

    - send_event_firewall (method) – An optional keyword argument which if defined, function or method to call for check if event is allowed for executing Default: `None` (no firewall)

  channel = 'node_client'
  close()

    Close the connection

  connect()

    Create the connection

  send(event)

    Send event through the connection

    Parameters:

      event (`circuits.core.events.Event`) – Event to send.

    Returns:

      The result object of the sended event

    Return type:

      generator