CHENGQI YANG / SmartLab_MuRata
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SocketStartReceiveResponse.cpp Source File

SocketStartReceiveResponse.cpp

00001 #include "SocketStartReceiveResponse.h"
00002 
00003 using namespace SmartLabMuRata;
00004 
00005 SocketStartReceiveResponse::SocketStartReceiveResponse(Payload * payload)
00006     : Payload(payload)
00007 { }
00008 
00009 SNICCode SocketStartReceiveResponse::GetStatus()
00010 {
00011     return (SNICCode)GetData()[2];
00012 }
00013 
00014 int SocketStartReceiveResponse::GetReceiveBufferSize()
00015 {
00016     if (GetStatus() == SNIC_SUCCESS)
00017         return GetData()[3] << 8 | GetData()[4];
00018 
00019     return -1;
00020 }