Giter Site home page Giter Site logo

Comments (7)

arun1587 avatar arun1587 commented on May 19, 2024

Is this still open?

from go-coap.

jkralik avatar jkralik commented on May 19, 2024

Yes. Unless someone implement I will do it in this year.

from go-coap.

arun1587 avatar arun1587 commented on May 19, 2024

So we validate the size of request against peerMaxMessageSize in handlePairMsg() and size of response against s.srv.MaxMessageSize in WriteMsgWithContext() for the sessionTCP. right? .If so, I could create a PR for it.

from go-coap.

jkralik avatar jkralik commented on May 19, 2024

peerMaxMessageSize:

  • must be check in blockWiseSession.WriteMsgWithContext, sessionTCP.WriteMsgWithContext
  • is set via CSM message from peer and it's determine maximum message (header+payload) size that can be send to the peer. (whole message that is send via blockwise),
  • for UDP it is not supported

s.srv.MaxMessageSize:

  • must be check when server read message from TCP/UDP connection: server.serveUDP , server.serverTCPconnnection - (for tcp it is immediately after parse coap header)
  • and it must be dynamically check in blockwise via blockWiseReceiver

from go-coap.

arun1587 avatar arun1587 commented on May 19, 2024

thanks for the clarification.
peerMaxMessageSize if not set in the CSM of peer defaults to 1152, right ?

(whole message that is send via blockwise)

I think the limit is for each block and not for whole message as explained in this section of RFC8323, no ?

from go-coap.

jkralik avatar jkralik commented on May 19, 2024

If peerMaxMessageSize is not, then peer doesn't limit a message.

You are right. It' s only limit each block.

Hm but i want to somehow limit whole message, because peer can exhaust memory of the server/client.

from go-coap.

jkralik avatar jkralik commented on May 19, 2024

MaxMessageSize was implemented by #42

from go-coap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.