'Subscribe to a topic
Only for SUB sockets.
.. versionadded:: 15.3'

def subscribe(self, topic):

    if isinstance(topic, unicode):
        topic = topic.encode('utf8')
    self.set(zmq.SUBSCRIBE, topic)
