Beispiel #1
0
        public void Get(Byte input1, Byte input2, UInt16 expected)
        {
            var coap = new CoAP
            {
                Bytes = new Byte[32]
            };

            coap.SetByte(2, input1);
            coap.SetByte(3, input2);

            coap.MessageId.Should().Be(expected);
        }
Beispiel #2
0
        public void Set(Byte expected1, Byte expected2, UInt16 input)
        {
            var coap = new CoAP
            {
                Bytes = new Byte[32]
            };

            coap.MessageId = input;

            coap.GetByte(2).Should().Be(expected1);
            coap.GetByte(3).Should().Be(expected2);
            coap.MessageId.Should().Be(input);
        }
Beispiel #3
0
 protected override void DoPut(CoAP.Server.Resources.CoapExchange exchange)
 {
     exchange.Respond(payload);
 }
Beispiel #4
0
 void IMessageDeliverer.DeliverResponse(Exchange exchange, CoAP.Response response)
 {
     if (exchange.Request == null)
         throw new ArgumentException("Request should not be empty.", "exchange");
     exchange.Request.Response = response;
 }