Comments (2)
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svsocket.