Rework lidar to better support testing and listeners.
This commit is contained in:
@@ -8,12 +8,10 @@ class ZmqPubSubStreamer:
|
||||
'''
|
||||
|
||||
def __init__(self, port):
|
||||
# Should create the socket here always, since zmq is not thread safe.
|
||||
# Hopefully whoever uses this is not stupid enough to create it then
|
||||
# pass it into a thread.
|
||||
self._socket = zmq.Context.instance().socket(zmq.PUB)
|
||||
print('Starting socket with address: ' + 'tcp://*:' + str(port))
|
||||
self._socket.bind("tcp://*:" + str(port))
|
||||
|
||||
|
||||
def send_message(self, message):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user