lib/solargraph/language_server/host.rb
def send_request method, params, &block
        message = {
          jsonrpc: "2.0",
          method: method,
          params: params,
          id: @next_request_id
        }
        json = message.to_json
        requests[@next_request_id] = Request.new(@next_request_id, &block)
        envelope = "Content-Length: #{json.bytesize}\r\n\r\n#{json}"
        queue envelope
        @next_request_id += 1
        logger.info "Server sent #{method}"
        logger.debug params
      end
# Send a request to the client and execute the provided block to process
# the response. If an ID is not provided, the host will use an auto-
# incrementing integer.
#
# @param method [String] The message method
# @param params [Hash] The method parameters
# @param id [String] An optional ID
# @yieldparam [Hash] The result sent by the client
Send a request to the client and execute the provided block to process
the response. If an ID is not provided, the host will use an auto
incrementing integer.
Send a request to the client and execute the provided block to process the response . If an ID is not provided the host will use an auto incrementing integer .
def send_request method, params, &block
        message = {
          jsonrpc: "2.0",
          method: method,
          params: params,
          id: @next_request_id
        }
        json = message.to_json
        requests[@next_request_id] = Request.new(@next_request_id, &block)
        envelope = "Content-Length: #{json.bytesize}\r\n\r\n#{json}"
        queue envelope
        @next_request_id += 1
        logger.info "Server sent #{method}"
        logger.debug params
      end
def send_request method , params , & block message = { jsonrpc : "2.0" , method : method , params : params , id : @next_request_id } json = message . to_json requests [ @next_request_id ] = Request . new ( @next_request_id , & block ) envelope = "Content-Length: #{json.bytesize}\r\n\r\n#{json}" queue envelope @next_request_id += 1 logger . info "Server sent #{method}" logger . debug params end
Send a request to the client and execute the provided block to process
the response.
Send a request to the client and execute the provided block to process the response .
method
The message method
The message method
params
The method parameters
The method parameters
block
id
An optional ID
An optional ID
The result sent by the client
The result sent by the client