Reading in JSON-RPC for LSP msg returning Null???
So long story short Im building an LSP and it has been a process. I finally got it hooked up to read in stdin from vscode only for my message to never return anything but null. Its not hat at some points I dont have the full message but as you'll see from my custom scanner and Split function the whole purpose is to scan until I am certain I have a finished message from vscode once I do for right now I just send the actual message to the logger to a text file.
2 Replies
So here is the log.txt:
ignore the json really just pay attention to the logs
and here is my main program:
and here is the CustomScanner Class:
As you can see it logs the message right before it reaches the bytes func... but once it does suddenly the message eviscerates gone just like that its null???? hence why it ''fails'' and yet just before the actual check in the log you can clearly see the message is complete?
there is a couple of weird things I noticed which is that the length doesnt match. Im not really sure what thats about but its out of the scope of this Q since it should'nt affect this
I needed a Buffer