lib/language_server/protocol/transport/stdio/writer.rb in language_server-protocol-3.14.0.0 vs lib/language_server/protocol/transport/stdio/writer.rb in language_server-protocol-3.14.0.1
- old
+ new
@@ -1,26 +1,11 @@
module LanguageServer
module Protocol
module Transport
module Stdio
- class Writer
- def write(response)
- response_str = response.merge(
- jsonrpc: "2.0"
- ).to_json
-
- headers = {
- "Content-Length" => response_str.bytesize
- }
-
- headers.each do |k, v|
- STDOUT.print "#{k}: #{v}\r\n"
- end
-
- STDOUT.print "\r\n"
-
- STDOUT.print response_str
- STDOUT.flush
+ class Writer < Io::Writer
+ def initialize
+ super STDOUT
end
end
end
end
end