ZIO
Python and C++ interface to ZeroMQ and Zyre
Public Member Functions | Public Attributes | List of all members
zio.node.Node Class Reference

Public Member Functions

def __init__ (self, nick, origin=0, hostname='127.0.0.1')
 
def __str__ (self)
 
def port (self, name, stype=None)
 
def online (self, headers)
 
def offline (self)
 

Public Attributes

 nick
 
 origin
 
 ports
 
 peer
 

Detailed Description

A vertex in a ported graph with ZIO edges

Definition at line 9 of file node.py.

Constructor & Destructor Documentation

◆ __init__()

def zio.node.Node.__init__ (   self,
  nick,
  origin = 0,
  hostname = '127.0.0.1' 
)
Create a node.

A node has a nickname.  It may assert a unique origin number.
A hostname may be specified for default binds of its ports or
one will attempt to be autodetected.

Definition at line 14 of file node.py.

Member Function Documentation

◆ __str__()

def zio.node.Node.__str__ (   self)

Definition at line 27 of file node.py.

◆ offline()

def zio.node.Node.offline (   self)
Bring node offline.

This will cause all ports to disconnect and unbind and the
peer to be destroyed.

Definition at line 67 of file node.py.

◆ online()

def zio.node.Node.online (   self,
  headers 
)
Bring node online.

The node will advertise a number of ZIO headers based on the
ports that have been prepared.  Additional application headers
may also be included.

Definition at line 47 of file node.py.

◆ port()

def zio.node.Node.port (   self,
  name,
  stype = None 
)
Return a port.

If the port with this name exists, return it.  Otherwise,
create one with the given ZeroMQ socket type.

Definition at line 31 of file node.py.

Member Data Documentation

◆ nick

zio.node.Node.nick

Definition at line 22 of file node.py.

◆ origin

zio.node.Node.origin

Definition at line 23 of file node.py.

◆ peer

zio.node.Node.peer

Definition at line 62 of file node.py.

◆ ports

zio.node.Node.ports

Definition at line 25 of file node.py.


The documentation for this class was generated from the following file: