public override T ExpectPacket <T>(ulong messageId)
        {
            if (decoder.TransportType == Smb2TransportType.Rdma)
            {
                byte[] smb2Response = null;
                while (smb2Response == null || smb2Response.Length == 0)
                {
                    smbdClient.ReceiveMessage(smbdConnectionTimeout, out smb2Response);
                }

                object        endpoint = new object();
                int           consumedLength;
                int           expectedLength;
                StackPacket[] stackPackets = decoder.Smb2DecodePacketCallback(endpoint, smb2Response, out consumedLength, out expectedLength);
                return((T)stackPackets[0]);
            }
            else
            {
                return(base.ExpectPacket <T>(messageId));
            }
        }
Beispiel #2
0
        // Override ExpectPacket
        public override T ExpectPacket <T>(ulong messageId)
        {
            if (this.decoder.TransportType == Smb2TransportType.Rdma)
            {
                byte[] smb2Response = null;
                while (smb2Response == null ||
                       smb2Response.Length == 0)
                {
                    smbdClient.ReceiveMessage(smb2ConnectionTimeout, out smb2Response);
                }

                //SmbdClient.ReceiveSmbdMessage(response.Length, response);
                object endpoint = new object();
                int    consumedLength;
                int    expectedLength;
                //byte[] smb2Response = response.Skip((int)transferHeaderSize).ToArray();
                StackPacket[] stackPackets = decoder.Smb2DecodePacketCallback(endpoint, smb2Response, out consumedLength, out expectedLength);
                return((T)stackPackets[0]);
            }
            else
            {
                return(base.ExpectPacket <T>(messageId));
            }
        }