/// <summary>
 /// Send a byte array to KDC. This method is especially used for negative test.
 /// </summary>
 /// <param name="packetBuffer">The bytes to be sent. This argument cannot be null.
 /// If it is null, ArgumentNullException will be thrown.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the input parameter is null.</exception>
 public void SendBytes(byte[] packetBuffer)
 {
     if (packetBuffer == null)
     {
         throw new ArgumentNullException("packetBuffer");
     }
     this.Connect();
     kdcTransport.SendBytes(packetBuffer);
 }
示例#2
0
        /// <summary>
        /// Send a byte array to KDC. This method is especially used for negative test.
        /// </summary>
        /// <param name="packetBuffer">The bytes to be sent. This argument cannot be null.
        /// If it is null, ArgumentNullException will be thrown.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when the input parameter is null.</exception>
        public void SendBytes(byte[] packetBuffer)
        {
            if (packetBuffer == null)
            {
                throw new ArgumentNullException(nameof(packetBuffer));
            }

            kdcTransport.SendBytes(packetBuffer);
        }
        /// <summary>
        /// Send a byte array to client. This method is especially used for negative test.
        /// </summary>
        /// <param name="packetBuffer">The bytes to be sent. This argument cannot be null.</param>
        /// <param name="kileConnection">Maintain a connection with a target client</param>
        /// <exception cref="System.ArgumentNullException">Thrown when the input parameter is null.</exception>
        public void SendBytes(byte[] packetBuffer, KileConnection kileConnection)
        {
            if (kileConnection == null)
            {
                throw new ArgumentNullException("kileConnection");
            }
            if (packetBuffer == null)
            {
                throw new ArgumentNullException("packetBuffer");
            }

            transport.SendBytes(kileConnection.TargetEndPoint, packetBuffer);
        }
示例#4
0
 /// <summary>
 /// Sends packet data to client (to keep compliant with Stack SDK conventions).
 /// </summary>
 /// <param name="context">The context that contains related info about client.</param>
 /// <param name="packetData">The packet data.</param>
 public void SendBytes(AdtsLdapContext context, byte[] packetData)
 {
     transportStack.SendBytes(context.RemoteAddress, packetData);
 }