C# 클래스 Tx.Network.NetworkTransformExtentions

파일 보기 프로젝트 열기: Reactive-Extensions/Tx

공개 메소드들

메소드 설명
GetUdpCheckSum ( this input ) : ushort

Uses the UDP Pseudoheader, UDP Header, and UDP payload to compute the checksum used in UDP transmission, per RFC 768

비공개 메소드들

메소드 설명
GetInternetChecksum ( byte input ) : ushort

Takes an IpPacket object and encodes it for transmission on the network in a byte array. Includes computing checksums.

Takes an UDPDatagram object and encodes it for transmission on the network in a byte array. Includes computing checksums.

Per RFC 768, compute a ones complement sum over the sum of the 16bit words in the byte array. If the array is too short a zero-pad byte is added.

This is not a CRC but is the checksum used for IP headers, UDP datagrams or TCP segments. Note that if the 16 bit integers on input are in network order, the answer will also be in network order.

NetworkOrderUshort ( ushort input ) : ushort
UdpHeaderToWireBytes ( this input ) : byte[]

Takes an IpPacket object and encodes the IP header for transmission on the network in a byte array. Includes computing checksums.

Takes a UDP Datagram object and encodes the UDP header for transmission on the network. Assumes UDP checksum is computed.

UdpPseudoHeader ( this input ) : byte[]

From a UDP datagram object, creates the UDP pseudoheader that is used to compute the UDP checksum per RFC 768

메소드 상세

GetUdpCheckSum() 공개 정적인 메소드

Uses the UDP Pseudoheader, UDP Header, and UDP payload to compute the checksum used in UDP transmission, per RFC 768
public static GetUdpCheckSum ( this input ) : ushort
input this The UdpDatagram object to check
리턴 ushort