I have both a CoAP Server and Client I wrote in Java with the Californium library. I can get resources from the server both through the client or with Firefox with the Copper(Cu) extension. I want to get the total size of the response i get from the server. I can get the size of the payload already, but I want the total message size. It doesn't matter if I accomplish this through code or with a tool. So far i have been unable to find on Google a way to accomplish this.
Determine total CoAP message size
353 Views Asked by svdotbe At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in BROWSER-EXTENSION
- Can browsersync inject updated content in the browser without a refresh?
- Get DOM values in browser extension
- Crossrider extension on browser launch
- Make sure ctypes DLL is called from my extension
- CrossRider - is there a way to pass arrays as function parameters without converting them to objects?
- Is it possible to list running programs/applications from web browser?
- getUserMedia API suport for Opera Local screen share
- CrossRider - How do I inject script to specific tabs? And how do I reload specific tabs?
- Install extension hosted in Chrome Web Store without ugly inline modal
- Getting started writing Extensions/Add-Ons/Plugins/BHOs for IE
- JavaScript completely "tamper safe" variables
- Asynchronous Promise and then()
- How to default Edge extension to show next to address bar by default
- Theoretically possible to bundle Mercurial or Git in a browser extension?
- Multiple JS files in Chrome Extension - how to load them?
Related Questions in COAP
- Proxy tool for CoAP integrated with DTLS
- getaddrinfo error Device or resource busy
- How to send a GET request from a coap server to a device running outside of local network?
- dynamically adding a resource to a python coap server with coapthon library
- using floating point in CC2538 based RE-Mote board for CoAP Server with Contiki OS
- CoAP support for twitter heron
- CoAP confirmable response
- MQTT and CoAP Sensors and Actuators
- How to connect Python COAP + DTLS client to a Eclipse Californium's CoAP Secure Server?
- Azure Applicaiton Insights not capturing requests made on @component class
- Need a CoAP lib for Ionic Apps
- Importing CoAP.NET in Unity
- How can I set a CoAP post request Body with a requestparameter and a File?
- How to run FreeRTOS on TM4C129EXL?
- Does ESP-CoAP library to implement CoAP protocol on ESP8266 still work?
Related Questions in CALIFORNIUM
- How to connect Python COAP + DTLS client to a Eclipse Californium's CoAP Secure Server?
- How can I set a CoAP post request Body with a requestparameter and a File?
- Coap server resources discovery
- Determine total CoAP message size
- Error caused by java.lang.NoClassDefFoundError and ClassNotFoundException
- DTLS-CoAP server from Contiki-NG fails during DTLS handshake
- Query related to Connection Id exchange between DTLS Client & Server using Californium Scandium core
- How to handle custom coap options (non-standard)
- How set a Coap Observer that listen for response
- Can implement ECDSA and ECDH like algorithm in CoAP with the help of californium?
- How to add extra options to CoAP request?
- Java Californium CoAP Server
- CoAPS Server, which coaps server can be used
- CoAP server could not be started
- CoAP GET data read using Californium get or discover method is inconsistent
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It depends on what you want to get.
1) If you just want to discover some footprints.
I'd recommend to use wireshark, capture and analyze the packets:
https://www.wireshark.org
2) If you want to use the lengths programatically
As far as I know there is no clean and direct way to achieve this.
There is some workarounds.
Connector
You may wrap a Connector and explicitly set an endpoint to the client (and server as well, but I'm showing a client version):
Here is the connector wrapper:
However, it is hard to associate these lengths and responses.
I use the following class to parse the RawData:
With that, you may associate a particular response and the overall length using, for example MID and token.
A pitfall here is that you have to use some global storage for that.
I don't recommend using it for production. Except some rare cases e.g. print some packet info + length. Which also maybe covered by enabling some appropriate Californium logger level as well.
So, it is a bad practice, literally.
MessageTracer and serializing Messages
You may implement a org.eclipse.californium.core.network.interceptors.MessageInterceptor interface, say, with a class MessageLengthTracer.
There you can serialize messages using org.eclipse.californium.core.network.serialization.DataSerializer with technique similar to the previous workaround and get their lengths.
Though, it is a workaround too and there is two pitfalls - possible length inaccuracy and double serialization work.
P.S. I will be glad if someone says I am wrong and point me to a clean way to do that.