Skip to content

jstorimer/sprout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprout

Sprout is an evented IO system written in pure Ruby. Sprout provies a single-threaded Reactor capable of processing many streams/connections concurrently.

Usage

# Simple echo service
reactor = Sprout::Reactor.new

# Get a server instance
server = reactor.listen '0.0.0.0', 4481

server.on(:accept) do |client|
  client.on(:data) do |data|
    client.write data
  end
end

reactor.start

For more examples see the examples/ directory.

Origin

This library was created as part of the video for Working With TCP Sockets.

Prior Art

Sprout borrows a lot of ideas from other evented systems.

License

MIT

About

Sprout is an evented IO system written in pure Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages