Yes We Can / yeswecancoap

Dependencies:   DebugLib EthernetInterface cantcoap mbed-rtos

Dependents:   COAP coap

Fork of yeswecancoap by Sille Van Landschoot

response.cpp

Committer:
sillevl
Date:
2015-10-21
Revision:
7:1bed29e1b0a4
Parent:
6:0c477f5b79ff
Child:
23:019c530468b4

File content as of revision 7:1bed29e1b0a4:

#include "response.h"


Response::Response() : CoapPDU()
{
       
}

Response::Response(uint8_t *pdu, int pduLength) : CoapPDU(pdu, pduLength)
{
    
}

Response::Response(uint8_t *buffer, int bufferLength, int pduLength) : CoapPDU(buffer, bufferLength, pduLength)
{
    
}

void Response::setContent(char* content, int length)
{
    CoapPDU::setCode(Response::COAP_CONTENT);
    setPayload(reinterpret_cast<uint8_t*>(content), length);
}