C# Class Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpeudp.RdpeudpSocket

Inheritance: IDisposable
Datei anzeigen Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Protected Properties

Property Type Description
unProcessedPacketBuffer List

Public Methods

Method Description
Close ( ) : void

Close connection of this socket

CreateAckVectorHeader ( ) : RDPUDP_ACK_VECTOR_HEADER

Create RDPUDP_ACK_VECTOR_HEADER Structure for packet sending

CreateFECPayload ( RdpeudpPacket sourcePackets, byte &uFecIndex ) : byte[]
CreateFECPayloadHeader ( uint snSourceStart, byte uSourceRange, byte uFecIndex ) : RDPUDP_FEC_PAYLOAD_HEADER

Create RDPUDP_FEC_PAYLOAD_HEADER Structure

CreateSourcePacket ( byte data ) : RdpeudpPacket

Create Source Packet from byte data

CreateSourcePayloadHeader ( ) : RDPUDP_SOURCE_PAYLOAD_HEADER

Create a RDPUDP_SOURCE_PAYLOAD_HEADER Structure

CreateSynData ( uint initialSequenceNumber = null ) : RDPUDP_SYNDATA_PAYLOAD

Create RDPUDP_SYNDATA_PAYLOAD Structure

CreateSynExData ( uUdpVer_Values version ) : RDPUDP_SYNDATAEX_PAYLOAD

Create RDPUDP_SYNDATAEX_PAYLOAD Structure

Dispose ( ) : void

Dispose this socket

ExpectACKPacket ( System.TimeSpan timeout ) : RdpeudpPacket

Expect an ACK packet

ExpectPacket ( System.TimeSpan timeout ) : RdpeudpPacket
FECRecover ( RdpeudpPacket sourcePackets, byte uFecIndex, byte fecData, uint targetIndex ) : byte[]
MarkSourcePacketReceived ( uint snSourceStart ) : void

Set a source packet have been received This method is only used when autohandle is false, this can make sure create correct Ack header when autohandle is false

ProcessAckOfAckVectorHeader ( RdpeudpPacket eudpPacket ) : void

Process RDPUDP_ACK_OF_ACKVECTOR_HEADER Structure if the packet have

ProcessFECPayloadData ( RdpeudpPacket eudpPacket ) : void

Process RDPUDP_FEC_PAYLOAD_HEADER Structure and FEC Payload

ProcessSourceData ( RdpeudpPacket eudpPacket ) : void

Process Source payload if the packet has source payload data

ProcessSynDataExPayload ( RdpeudpPacket eudpPacket ) : void

The highest version supported by both endpoints, which is RDPUDP_PROTOCOL_VERSION_1 if either this packet or the SYN packet does not specify a version, is the version that MUST be used by both endpoints.

ProcessSynPacket ( RdpeudpPacket eudpPacket ) : void

Process a Syn Packet

RdpeudpSocket ( TransportMode mode, IPEndPoint remoteEp, bool autohandle, RdpeudpSocketSender sender ) : System

Constructor.

ReceivePacket ( RdpeudpPacket eudpPacket ) : void

Method used to process a received packet

ReceivePacket ( StackPacket packet ) : void

Method used to process a received packet

RetransmitPacket ( RdpeudpPacket packet ) : bool
Send ( byte data ) : bool

Send Data from this specified UDP transport

SendAcKPacket ( bool delayACK = false ) : bool

Send an ACK Datagrams

SendBytesByUDP ( byte data ) : void

Send bytes via UDP transport

SendPacket ( RdpeudpPacket packet ) : bool

Send a RDPEUDP Packet

Private Methods

Method Description
AckPacketReceived ( ) : void

Send Ack packet if necessary.

DisposeTimers ( ) : void

Dispose Times of RDPEUDP socket

InitTimers ( ) : void

Create Timers for RDPEUDP socket

IsInReceiveWindow ( uint snSourceStart ) : bool

Verify whether a sequence number is in receive window

IsInSendWindow ( uint snSourceStart ) : bool

Verify whether a sequence number is in send window

ManageDelayAck ( object state ) : void

Function used to manage Delay ACK timer

ManageKeepLive ( object state ) : void

Function used to manage keep alive timer

ManageRetransmit ( object state ) : void

Function used to manage retransmit periodically

ProcessAckVectorHeader ( RdpeudpPacket eudpPacket ) : void

Process RDPUDP_ACK_VECTOR_HEADER if the packet contains a RDPUDP_ACK_VECTOR_HEADER

UpdateOutSnAckOfAcksSeqNum ( RdpeudpPacket eudpPacket ) : void

Used during sending source packet, Add RDPUDP_ACK_OF_ACKVECTOR_HEADER structure into the packet to update OutSnAckOfAcksSeqNum

UpdateOutSnAckOfAcksSeqNum ( uint receivedSnSourceAck ) : void

Used during receiving packet, if snSourceAck of received packet is larger than seqNumofPacketWithAckOfAckVector Update the OutSnAckOfAcksSeqNum to new one

UpdateReceiveWindow ( ) : void

Update Receive window, process and remove received packets

UpdateSendWindow ( ) : void

Update Send Window, remove acknowledged packet from outPacketDic

Method Details

Close() public method

Close connection of this socket
public Close ( ) : void
return void

CreateAckVectorHeader() public method

Create RDPUDP_ACK_VECTOR_HEADER Structure for packet sending
public CreateAckVectorHeader ( ) : RDPUDP_ACK_VECTOR_HEADER
return RDPUDP_ACK_VECTOR_HEADER

CreateFECPayload() public method

public CreateFECPayload ( RdpeudpPacket sourcePackets, byte &uFecIndex ) : byte[]
sourcePackets RdpeudpPacket
uFecIndex byte
return byte[]

CreateFECPayloadHeader() public method

Create RDPUDP_FEC_PAYLOAD_HEADER Structure
public CreateFECPayloadHeader ( uint snSourceStart, byte uSourceRange, byte uFecIndex ) : RDPUDP_FEC_PAYLOAD_HEADER
snSourceStart uint
uSourceRange byte
uFecIndex byte
return RDPUDP_FEC_PAYLOAD_HEADER

CreateSourcePacket() public method

Create Source Packet from byte data
public CreateSourcePacket ( byte data ) : RdpeudpPacket
data byte
return RdpeudpPacket

CreateSourcePayloadHeader() public method

Create a RDPUDP_SOURCE_PAYLOAD_HEADER Structure
public CreateSourcePayloadHeader ( ) : RDPUDP_SOURCE_PAYLOAD_HEADER
return RDPUDP_SOURCE_PAYLOAD_HEADER

CreateSynData() public method

Create RDPUDP_SYNDATA_PAYLOAD Structure
public CreateSynData ( uint initialSequenceNumber = null ) : RDPUDP_SYNDATA_PAYLOAD
initialSequenceNumber uint
return RDPUDP_SYNDATA_PAYLOAD

CreateSynExData() public method

Create RDPUDP_SYNDATAEX_PAYLOAD Structure
public CreateSynExData ( uUdpVer_Values version ) : RDPUDP_SYNDATAEX_PAYLOAD
version uUdpVer_Values
return RDPUDP_SYNDATAEX_PAYLOAD

Dispose() public method

Dispose this socket
public Dispose ( ) : void
return void

ExpectACKPacket() public method

Expect an ACK packet
public ExpectACKPacket ( System.TimeSpan timeout ) : RdpeudpPacket
timeout System.TimeSpan
return RdpeudpPacket

ExpectPacket() public method

public ExpectPacket ( System.TimeSpan timeout ) : RdpeudpPacket
timeout System.TimeSpan
return RdpeudpPacket

FECRecover() public method

public FECRecover ( RdpeudpPacket sourcePackets, byte uFecIndex, byte fecData, uint targetIndex ) : byte[]
sourcePackets RdpeudpPacket
uFecIndex byte
fecData byte
targetIndex uint
return byte[]

MarkSourcePacketReceived() public method

Set a source packet have been received This method is only used when autohandle is false, this can make sure create correct Ack header when autohandle is false
public MarkSourcePacketReceived ( uint snSourceStart ) : void
snSourceStart uint
return void

ProcessAckOfAckVectorHeader() public method

Process RDPUDP_ACK_OF_ACKVECTOR_HEADER Structure if the packet have
public ProcessAckOfAckVectorHeader ( RdpeudpPacket eudpPacket ) : void
eudpPacket RdpeudpPacket
return void

ProcessFECPayloadData() public method

Process RDPUDP_FEC_PAYLOAD_HEADER Structure and FEC Payload
public ProcessFECPayloadData ( RdpeudpPacket eudpPacket ) : void
eudpPacket RdpeudpPacket
return void

ProcessSourceData() public method

Process Source payload if the packet has source payload data
public ProcessSourceData ( RdpeudpPacket eudpPacket ) : void
eudpPacket RdpeudpPacket
return void

ProcessSynDataExPayload() public method

The highest version supported by both endpoints, which is RDPUDP_PROTOCOL_VERSION_1 if either this packet or the SYN packet does not specify a version, is the version that MUST be used by both endpoints.
public ProcessSynDataExPayload ( RdpeudpPacket eudpPacket ) : void
eudpPacket RdpeudpPacket
return void

ProcessSynPacket() public method

Process a Syn Packet
public ProcessSynPacket ( RdpeudpPacket eudpPacket ) : void
eudpPacket RdpeudpPacket
return void

RdpeudpSocket() public method

Constructor.
public RdpeudpSocket ( TransportMode mode, IPEndPoint remoteEp, bool autohandle, RdpeudpSocketSender sender ) : System
mode TransportMode The mode which indicate this connection if reliable or lossy.
remoteEp IPEndPoint The remote endpoint.
autohandle bool
sender RdpeudpSocketSender Sender Used to send packet
return System

ReceivePacket() public method

Method used to process a received packet
public ReceivePacket ( RdpeudpPacket eudpPacket ) : void
eudpPacket RdpeudpPacket
return void

ReceivePacket() public method

Method used to process a received packet
public ReceivePacket ( StackPacket packet ) : void
packet StackPacket
return void

RetransmitPacket() public method

public RetransmitPacket ( RdpeudpPacket packet ) : bool
packet RdpeudpPacket
return bool

Send() public method

Send Data from this specified UDP transport
public Send ( byte data ) : bool
data byte Data to send
return bool

SendAcKPacket() public method

Send an ACK Datagrams
public SendAcKPacket ( bool delayACK = false ) : bool
delayACK bool
return bool

SendBytesByUDP() public method

Send bytes via UDP transport
public SendBytesByUDP ( byte data ) : void
data byte
return void

SendPacket() public method

Send a RDPEUDP Packet
public SendPacket ( RdpeudpPacket packet ) : bool
packet RdpeudpPacket
return bool

Property Details

unProcessedPacketBuffer protected_oe property

protected List unProcessedPacketBuffer
return List