def xpubsubSockets(self, hostSub, portSub, hostPub, portPub):
frontend_addr = self.tcpAddress(hostSub, portSub)<EOL>backend_addr = self.tcpAddress(hostPub, portPub)<EOL>frontendSocket = self._context.socket(zmq.SUB)<EOL>frontendSocket.bind(frontend_addr)<EOL>frontendSocket.setsockopt(zmq.SUBSCRIBE, b'<STR_LIT>')<EOL>backendSocket = self._context.socket(zmq.PUB)<EOL>backendSocket.bind(backend_addr)<EOL>return frontendSocket, backendSocket<EOL>
Creates frontend and backend for a XPUB/XSUB forwarding device