SemysPacket

01
typedef struct tagSemysPacket
{
  enum SemysPacketType mType;
  char const *mTypeString;

  void (*mEncoder)(struct tagSemysPacket *pHeader, HSemysCoder coder);
  int32 (*mDecoder)(struct tagSemysPacket *pHeader, HSemysCoder coder);
  void (*mDestroy)(struct tagSemysPacket *pHeader);
} SemysPacket;
02 Members:
  • mType: Packet type identification.
  • mTypeString: Type specific string, used for traces.
  • mEncoder: Pointer to a type specific encoder function.
  • mDecoder: Pointer to a type specific decoder function.
  • mDestroy: Pointer to a type specific destroy function.
01 mEncoder should point to a function that encodes the type specific members into coder.
02 mDecoder should point to a function that decodes the type specific members into coder. It returns nonzero on success or 0 if a serialization failure occurred.
03 mDestroy should point to a function that frees any type specific memory.
04 These functions should not be called directly, but rather through the corresponding public functions of the packet sub-system.
05 Reference: SemysPacket.h
Implementation: Semys Library
See Also: Packet Sub-System

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.