Sha256: 154c381f77b7d959d1eaa387e076fd982ea6e48a93ee204dc30ae1fe97a929b7
Contents?: true
Size: 663 Bytes
Versions: 106
Compression:
Stored size: 663 Bytes
Contents
module LanguageServer module Protocol module Transport module Io class Writer attr_reader :io def initialize(io) @io = io io.binmode end def write(response) response_str = response.merge( jsonrpc: "2.0" ).to_json headers = { "Content-Length" => response_str.bytesize } headers.each do |k, v| io.print "#{k}: #{v}\r\n" end io.print "\r\n" io.print response_str io.flush end end end end end end
Version data entries
106 entries across 106 versions & 13 rubygems