summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-08 17:17:35 -0400
committerpommicket <pommicket@gmail.com>2023-09-08 17:18:51 -0400
commit100859239a28c2709bb3e2cdce347300a2b763e2 (patch)
treeb45486fe7c2a3318d9702adbe17ce17b672a78d1 /lsp-write.c
parent49f22fb75ae7ec5ffa98532c060d81e18d71575c (diff)
LSP over TCP initial draft
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c
index fd80799..9722a7b 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -334,7 +334,10 @@ static void message_writer_write_and_free(LSP *lsp, JSONWriter *o) {
fprintf(lsp->log, "LSP MESSAGE FROM CLIENT TO SERVER\n%s\n\n", content + header_size);
}
- process_write(lsp->process, content, strlen(content));
+ if (lsp->socket)
+ socket_write(lsp->socket, content, strlen(content));
+ else
+ process_write(lsp->process, content, strlen(content));
str_builder_free(&builder);
}