Sha256: 07ff05ed4bb038fa319f82be9a6de0032277d8ff4dfc1853c49bfbadeaf1f06a

Contents?: true

Size: 627 Bytes

Versions: 18

Compression:

Stored size: 627 Bytes

Contents

# Allow examples to be run directly outside of the Gem
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
require 'rubygems'
require 'ruby_skynet'

SemanticLogger.default_level = :info
SemanticLogger.add_appender(STDOUT)

# Just echo back any parameters received when the echo method is called
class EchoService
  include RubySkynet::Service

  # Methods implemented by this service
  # Must take a Hash as input
  # Must Return a Hash response or nil for no response
  def echo(params)
    params['echo'] = true
    params
  end
end

# Start the server
RubySkynet::Server.start

puts "Press enter to shutdown server"
gets

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby_skynet-2.0.0 examples/echo_server.rb
ruby_skynet-1.3.0.alpha3 examples/echo_server.rb
ruby_skynet-1.3.0.alpha2 examples/echo_server.rb
ruby_skynet-1.3.0.alpha1 examples/echo_server.rb
ruby_skynet-2.0.0.rc1 examples/echo_server.rb
ruby_skynet-1.2.7 examples/echo_server.rb
ruby_skynet-1.2.6 examples/echo_server.rb
ruby_skynet-1.2.5 examples/echo_server.rb
ruby_skynet-1.2.4 examples/echo_server.rb
ruby_skynet-1.2.3 examples/echo_server.rb
ruby_skynet-1.2.2 examples/echo_server.rb
ruby_skynet-1.2.1 examples/echo_server.rb
ruby_skynet-1.2.0 examples/echo_server.rb
ruby_skynet-1.1.1 examples/echo_server.rb
ruby_skynet-1.1.0 examples/echo_server.rb
ruby_skynet-1.0.0 examples/echo_server.rb
ruby_skynet-0.8.1 examples/echo_server.rb
ruby_skynet-0.8.0 examples/echo_server.rb