C# 클래스 MiniUDP.NetEncoding

파일 보기 프로젝트 열기: ashoulson/MiniUDP 1 사용 예제들

비공개 메소드들

메소드 설명
GetType ( byte buffer ) : NetPacketType

Peeks the type from the packet buffer.

PackCarrier ( byte buffer, ushort notificationAck, ushort notificationSeq, IEnumerable notifications ) : int

Packs a series of notifications into the buffer.

PackConnectRequest ( byte buffer, string version, string token ) : int

Packs a connect request with version and token strings.

PackNotification ( byte buffer, int position, byte data, ushort dataLength ) : int

Packs a notification prepended with that notification's length.

PackPayload ( byte buffer, ushort sequence, byte data, ushort dataLength ) : int

Packs a payload to the given buffer.

PackProtocol ( byte buffer, NetPacketType type, byte firstParam, byte secondParam ) : int
PackU16 ( byte buffer, int position, ushort value ) : void

Encodes a U16 into a buffer at a location in Big Endian order.

ReadCarrier ( Func eventFactory, NetPeer peer, byte buffer, int length, ushort &notificationAck, ushort &notificationSeq, Queue destinationQueue ) : bool

Reads a collection of notifications packed in the buffer.

ReadConnectRequest ( byte buffer, string &version, string &token ) : bool

Reads a packed connect request with version and token strings.

ReadNotification ( byte buffer, int length, int position, NetEvent destination ) : int

Reads a length-prefixed notification block.

ReadPayload ( Func eventFactory, NetPeer peer, byte buffer, int length, ushort &sequence, NetEvent &evnt ) : bool

Reads payload data from the given buffer.

ReadProtocol ( byte buffer, int length, byte &firstParam, byte &secondParam ) : bool
ReadU16 ( byte buffer, int position ) : ushort

Reads a U16 from a buffer at a location in Big Endian order.