class Farcall::DebugSocketStream
The socket stream that imitates slow data reception over the slow internet connection use to for testing only
Public Class Methods
new(socket, timeout)
click to toggle source
@param [float] timeout between sending individual bytes in seconds
Calls superclass method
Farcall::SocketStream::new
# File lib/farcall/json_transport.rb, line 41 def initialize socket, timeout super socket @timeout = timeout end
Public Instance Methods
write(data)
click to toggle source
Calls superclass method
Farcall::SocketStream#write
# File lib/farcall/json_transport.rb, line 46 def write data data.to_s.each_char { |x| super x sleep @timeout } end