Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Not getting the complete response from coAP serve

Depending on whether you are using DTLS or plain UDP, Californium uses
the following defaults for maximum datagram payload size:

UDP: 2048 bytes
DTLS: around 16kb

By default, Californium uses "transparent blockwise transfers" for
large resource bodies. So, when you use a Cf client with a Cf server,
the large body is transferred using a blockwise transfer (i.e. by means
of multiple "chunks" of data transferred consecutively using separate
requests) under the hood. When you use e.g. the CoapClient you will not
be able to see that there are in fact multiple request going on.

However, when you use a Cf client with a CoAP server that doesn't
support blockwise transfers (which seems to be the case here), the
server tries to send the response body in one large datagram. 
I suspect that the resource to be transferred exceeds the limits
indicated above and the client therefore truncates the incoming
datagram, i.e. you only get the first 2 or 16 kb.

Regards,
Kai
 
On Sat, 2017-02-25 at 13:29 +0530, Sreejith S wrote:
> Hi Kraus,
> 
> I am using UDP. One thing still i am not able to understand. It would
> be great if you can clarify that. If i use Java server and client ,
> it does not have any block issues. I am able to send large payload. 
> 
> And since you said Go COAP server also allows large payload , then in
> the case of Go Server and Java client why client is not able to get
> the response completely ?
> 
> Thank You
> Sreejith
> 
> 
> 
> 
> _______________________________________________
> cf-dev mailing list
> cf-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/cf-dev

Back to the top