Example #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)
Example #2
0
File: mcs.py Project: dnozay/rdpy
 def readDomainParams(self, s):
     """
     Read domain parameters structure
     @return: (max_channels, max_users, max_tokens, max_pdu_size)
     """
     if not ber.readUniversalTag(s, ber.Tag.BER_TAG_SEQUENCE, True):
         raise InvalidValue("bad BER tags")
     ber.readLength(s)#length
     max_channels = ber.readInteger(s)
     max_users = ber.readInteger(s)
     max_tokens = ber.readInteger(s)
     ber.readInteger(s)
     ber.readInteger(s)
     ber.readInteger(s)
     max_pdu_size = ber.readInteger(s)
     ber.readInteger(s)
     return (max_channels, max_users, max_tokens, max_pdu_size)