Git Product home page Git Product logo

Comments (2)

phgrosjean avatar phgrosjean commented on June 14, 2024

I surely understand there could be uses for {svSocket} with incomplete lines. However, the way the tcl socket library works does not allow it in its text line mode that I use. It would be necessary to reengineer a big part of the core of svSocket to implement this feature.

There is still a problem: how do you detect a message is complete? With sockets, message streams can be send piece by piece, and you need a way to detect this is the end of a message (currently, it is the end of line character that plays this role). In you test with the debugger, you probably did not encountered a message long enough to be passed by chunks, but in a more general context. So, what mechanisms should you use to detect that you got the complete message?

I close this issue, and I am sorry I could not do that for you. However, if you find a workable solution on your side, I would be happy to review a pull request to enhance {svSocket} and allow it to work the way you would like.

Best,

Philippe Grosjean

from svsocket.

ManuelHentschel avatar ManuelHentschel commented on June 14, 2024

Thanks for the detailed response, makes sense that you don't want to reengineer the entire package for this!

Regarding the detection of complete messages: DAP-messages specify their length at the beginning, so you can just cache chunks until you reach this length. E.g.

Content-Length: 119\r\n
\r\n
{
    "seq": 153,
    "type": "request",
    "command": "next",
    "arguments": {
        "threadId": 3
    }
}

(without \r\n at the end)

I have no experience with tcl whatsoever, so I'll probably look into some C/C++ solution for this.

Best,
Manuel

from svsocket.

Related Issues (6)

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.