def __init__(self, in_type, out_type, mon_type, in_prefix='in', out_prefix='out'):
     
     Device.__init__(self, QUEUE, in_type, out_type)
     
     self.mon_type = mon_type
     self._mon_binds = list()
     self._mon_connects = list()
     self._mon_sockopts = list()
     
     self._in_prefix = in_prefix
     self._out_prefix = out_prefix
 def _setup_sockets(self):
     ins,outs = Device._setup_sockets(self)
     ctx = self._context
     mons = ctx.socket(self.mon_type)
     
     # set sockopts (must be done first, in case of eipc.IDENTITY)
     for opt,value in self._mon_sockopts:
         mons.setsockopt(opt, value)
     
     for iface in self._mon_binds:
         mons.bind(iface)
     
     for iface in self._mon_connects:
         mons.connect(iface)
     
     return ins,outs,mons