Murata RF modules are designed to simplify wireless development and certification by minimizing the amount of RF expertise you need to wirelessly enable a wide range of applications.

Indication/SocketReceiveInidcation.h

Committer:
yangcq88517
Date:
2016-03-16
Revision:
9:0ce800923eda
Parent:
0:8e83b9448758

File content as of revision 9:0ce800923eda:

#ifndef SmartLab_MuRata_Indication_SocketReceiveInidcation
#define SmartLab_MuRata_Indication_SocketReceiveInidcation

#include "Payload.h"

namespace SmartLabMuRata
{
/// <summary>
/// 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
/// </summary>
class SocketReceiveInidcation : public Payload
{
private:
    int receiveLength;

public:
    static const int PAYLOAD_OFFSET = 5;

    SocketReceiveInidcation(Payload * payload);

    char GetServerSocketID() ;

    int GetPayloadLength();

    char GetPayload(int index);

    const char * GetPayload();

    /// <summary>
    /// Get the start index of the payload
    /// </summary>
    /// <returns></returns>
    int GetPayloadOffset();
};
}

#endif