'Takes Protocol instance as argument.
Puts stanza into "send" fifo queue. Items into the send queue are hold until
stream authenticated. After that this method is effectively the same as "sendnow" method.'

def enqueue(self, stanza):

    if isinstance(stanza, Protocol):
        self.stanza_queue.append(stanza)
    else:
        self.sendbuffer += stanza
    if (self._socket_state >= SOCKET_ALIVE):
        self.push_queue()
