Sha256: 43219cee1efb7cbb764ede049f1a6f557db3fa505c0153f0fc088fb1b538e154
Contents?: true
Size: 601 Bytes
Versions: 1
Compression:
Stored size: 601 Bytes
Contents
module Backport module Server # A mixin for Backport servers that communicate with clients. # # Connectable servers check clients for incoming data on each tick. # module Connectable def tick clients.each do |client| input = client.read client.sending input unless input.nil? end end def starting clients.map(&:run) end def stopping clients.map(&:stop) end # @return [Array<Client>] def clients @clients ||= [] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
backport-0.3.0 | lib/backport/server/connectable.rb |