Show / Hide Table of Contents

    Class Packet

    Implements the exchange packetSystem.IDisposable
    Inheritance
    System.Object
    Packet
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: TM
    Assembly: TM.dll
    Syntax
    public class Packet : IDisposable

    Constructors

    | Improve this Doc View Source

    Packet(EServerType, EPacketType, Byte)

    Initializes a new instance of the Packet class.
    Declaration
    public Packet(EServerType server_type, EPacketType type, byte cmd)
    Parameters
    Type Name Description
    EServerType server_type
    EPacketType type
    System.Byte cmd
    | Improve this Doc View Source

    Packet(EServerType, EPacketType, Byte, Byte, Byte[])

    Initializes a new instance of the Packet class.
    Declaration
    public Packet(EServerType server_type, EPacketType type, byte cmd, byte value = 0, byte[] data = null)
    Parameters
    Type Name Description
    EServerType server_type
    EPacketType type
    System.Byte cmd
    System.Byte value
    System.Byte[] data
    | Improve this Doc View Source

    Packet(EServerType, EPacketType, Byte, UInt32, Byte[])

    Initializes a new instance of the Packet class.
    Declaration
    public Packet(EServerType server_type, EPacketType type, byte value, uint length, byte[] data)
    Parameters
    Type Name Description
    EServerType server_type
    EPacketType type
    System.Byte value
    System.UInt32 length
    System.Byte[] data
    | Improve this Doc View Source

    Packet(EServerType, EPacketType, String)

    Initializes a new instance of the Packet class.
    Declaration
    public Packet(EServerType server_type, EPacketType type, string data)
    Parameters
    Type Name Description
    EServerType server_type
    EPacketType type
    System.String data

    Fields

    | Improve this Doc View Source

    Header

    The packet header
    Declaration
    public PacketHeader Header
    Field Value
    Type Description
    PacketHeader

    Properties

    | Improve this Doc View Source

    Data

    The array byte of TotalSize
    Declaration
    public BufferChunk Data { get; }
    Property Value
    Type Description
    BufferChunk
    | Improve this Doc View Source

    PacketNumber

    The absolute counter of packets
    Declaration
    public static int PacketNumber { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    ServerType

    Gets the type of the server.
    Declaration
    public EServerType ServerType { get; }
    Property Value
    Type Description
    EServerType
    | Improve this Doc View Source

    TotalSize

    The Total Size = sizeof(header) + sizeof(Data) + checksum
    Declaration
    public int TotalSize { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Dispose()

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    IsChecksumOK(Byte[])

    Checks the checksum.
    Declaration
    public bool IsChecksumOK(byte[] pdata)
    Parameters
    Type Name Description
    System.Byte[] pdata The pdata.
    Returns
    Type Description
    System.Boolean true if OK, false otherwise.
    | Improve this Doc View Source

    ToString()

    Returns a System.String that represents this instance.
    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Implements

    System.IDisposable

    See Also

    System.IDisposable
    • Improve this Doc
    • View Source
    GitHub
    В начало