Пример #1
0
        // Sending Server Announce Request.
        private void SendServerPDUOverDVC(PacketId_Values packetType, uint?clientId = null)
        {
            RdpefsPDU pdu = null;

            switch (packetType)
            {
            case PacketId_Values.PAKID_CORE_SERVER_ANNOUNCE:
                pdu = CreateServerAnnounceReqest();
                break;

            case PacketId_Values.PAKID_CORE_SERVER_CAPABILITY:
                pdu = CreateServerCoreCapabilityRequest();
                break;

            case PacketId_Values.PAKID_CORE_CLIENTID_CONFIRM:
                pdu = CreateServerClientIdConfirm(clientId);
                break;

            case PacketId_Values.PAKID_CORE_USER_LOGGEDON:
                pdu = new DR_CORE_USER_LOGGEDON();
                break;
            }

            if (pdu != null && rdpefsServer != null)
            {
                rdpefsServer.SendRdpefsPdu(pdu);
            }
            else
            {
                throw new InvalidOperationException("The sending pdu type is null: " + packetType.ToString());
            }
        }
 public DR_CORE_CAPABILITY(PacketId_Values packetId)
     : base(Component_Values.RDPDR_CTYP_CORE, packetId)
 {
     this.Padding = 0;
 }
 public void Decode(PduMarshaler marshaler)
 {
     try
     {
         this.Component = (Component_Values)marshaler.ReadUInt16();
         this.PacketId = (PacketId_Values)marshaler.ReadUInt16();
     }
     catch
     {
         marshaler.Reset();
         throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd());
     }
 }
 public RdpefsPDU(Component_Values component, PacketId_Values packetId)
 {
     this.Header = new RDPDR_HEADER(component, packetId);
 }
 public RDPDR_HEADER(Component_Values component, PacketId_Values packetId)
 {
     this.Component = component;
     this.PacketId = packetId;
 }