CHENGQI YANG / SmartLab_MuRata
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SocketReceiveInidcation.h Source File

SocketReceiveInidcation.h

00001 #ifndef SmartLab_MuRata_Indication_SocketReceiveInidcation
00002 #define SmartLab_MuRata_Indication_SocketReceiveInidcation
00003 
00004 #include "Payload.h"
00005 
00006 namespace SmartLabMuRata
00007 {
00008 /// <summary>
00009 /// This event is generated when a TCP server or a UDP server (in connected mode) receives a packet. Since there is no client address and port information, the application may need to call
00010 /// </summary>
00011 class SocketReceiveInidcation : public Payload
00012 {
00013 private:
00014     int receiveLength;
00015 
00016 public:
00017     static const int PAYLOAD_OFFSET = 5;
00018 
00019     SocketReceiveInidcation(Payload * payload);
00020 
00021     char GetServerSocketID() ;
00022 
00023     int GetPayloadLength();
00024 
00025     char GetPayload(int index);
00026 
00027     const char * GetPayload();
00028 
00029     /// <summary>
00030     /// Get the start index of the payload
00031     /// </summary>
00032     /// <returns></returns>
00033     int GetPayloadOffset();
00034 };
00035 }
00036 
00037 #endif