0

We are planning to use Apache libraries with support of OSGI framework in our project. As target server for our application is embedded system with constrained resources so we need to modify protocol layer in such way to use CoAP protocol(specific for constrained resources) in place of HTTP

Harsh
  • 1
  • 1
  • 4
    So whats your question? Please read https://stackoverflow.com/help/mcve – Milan Chheda Jun 07 '17 at 10:37
  • Thanks Milan for your suggestion. As It's my first query in stackoverflow so your link guided me better way. Below is the piece of HTTP connection code that I want to replace with HTTP without using proxy implementation – Harsh Jun 15 '17 at 05:28
  • Below is the piece of HTTP connection code that I want to replace with CoAP. Kindly suggest how to do it Connection handler(where url is HTTP URL of server):- public URLConnection getConnection(URL url) throws IOException { URLConnection connection = url.openConnection(); return connection; } Use of Connection Object as provided by Handler:- private boolean prepareNextChunk() throws IOException { m_conn = m_handler.getConnection(m_url); applyRangeHeader(m_conn); long[] contentInfo = getContentRangeInfo(m_conn); return (m_conn != null) && contentRemaining(); } – Harsh Jun 15 '17 at 05:42

0 Answers0