Esempio n. 1
0
 def recvConnectResponse(self, data):
     """
     @summary: Receive MCS connect response from server
     Send Erect domain Request
     Send Attach User Request
     Wait Attach User Confirm
     @param data: {Stream}
     """
     ber.readApplicationTag(data, UInt8(Message.MCS_TYPE_CONNECT_RESPONSE))
     ber.readEnumerated(data)
     ber.readInteger(data)
     self.readDomainParams(data)
     if not ber.readUniversalTag(data, ber.Tag.BER_TAG_OCTET_STRING, False):
         raise InvalidExpectedDataException("invalid expected BER tag")
     gccRequestLength = ber.readLength(data)
     if data.dataLen() != gccRequestLength:
         raise InvalidSize("bad size of GCC request")
     self._serverSettings = gcc.readConferenceCreateResponse(data)
     
     #send domain request
     self.sendErectDomainRequest()
     #send attach user request
     self.sendAttachUserRequest()
     #now wait user confirm from server
     self.setNextState(self.recvAttachUserConfirm)
Esempio n. 2
0
    def recvConnectResponse(self, data):
        """
        @summary: Receive MCS connect response from server
        Send Erect domain Request
        Send Attach User Request
        Wait Attach User Confirm
        @param data: {Stream}
        """
        ber.readApplicationTag(data, UInt8(Message.MCS_TYPE_CONNECT_RESPONSE))
        ber.readEnumerated(data)
        ber.readInteger(data)
        self.readDomainParams(data)
        if not ber.readUniversalTag(data, ber.Tag.BER_TAG_OCTET_STRING, False):
            raise InvalidExpectedDataException("invalid expected BER tag")
        gccRequestLength = ber.readLength(data)
        if data.dataLen() != gccRequestLength:
            raise InvalidSize("bad size of GCC request")
        self._serverSettings = gcc.readConferenceCreateResponse(data)

        #send domain request
        self.sendErectDomainRequest()
        #send attach user request
        self.sendAttachUserRequest()
        #now wait user confirm from server
        self.setNextState(self.recvAttachUserConfirm)