def __init__(self, callback, monitor_id, client):
        """Creates a PushSession for use with Device Cloud

        :param callback: The callback function to invoke when data received.
            Must have 1 required parameter that will contain the payload.
        :param monitor_id: The id of the Monitor to observe.
        :param client: The client object this session is derived from.
        """
        self.callback = callback
        self.monitor_id = monitor_id
        self.client = client
        self.socket = None
        self.log = logging.getLogger("%s.push_session.%s" % (__name__, monitor_id))

        # Received protocol data holders.
        self.data = six.b("")
        self.message_length = 0
def __init__ ( self , callback , monitor_id , client ) : self . callback = callback self . monitor_id = monitor_id self . client = client self . socket = None self . log = logging . getLogger ( "%s.push_session.%s" % ( __name__ , monitor_id ) ) self . data = six . b ( "" ) self . message_length = 0
Creates a PushSession for use with Device Cloud

        :param callback: The callback function to invoke when data received.
            Must have 1 required parameter that will contain the payload.
        :param monitor_id: The id of the Monitor to observe.
        :param client: The client object this session is derived from.