private function sendAck(CoapResponse $resp, $code = '2.00') { $ack = new CoapPdu(); $ack->setType(CoapPdu::ACK); $ack->setCode($code); $ack->setMessageId($resp->getMessageId()); $this->sock->send($ack->getMessage()); }