def start_server(self):
"""
Binds the server to the configured host and port and starts listening.
"""
if self._socket is None:
context = zmq.Context()
self._socket = context.socket(zmq.REP)
self._socket.setsockopt(zmq.RCVTIMEO, 100)
self._socket.bind('tcp://{0}:{1}'.format(self.host, self.port))
self.log.info('Listening on %s:%s', self.host, self.port)
评论列表
文章目录