Class: Nonnative::DelaySocketPair

Inherits:
SocketPair show all
Defined in:
lib/nonnative/delay_socket_pair.rb

Instance Method Summary collapse

Methods inherited from SocketPair

#connect, #initialize

Constructor Details

This class inherits a constructor from Nonnative::SocketPair

Instance Method Details

#read(socket) ⇒ Object



5
6
7
8
9
10
# File 'lib/nonnative/delay_socket_pair.rb', line 5

def read(socket)
  duration = proxy.options[:delay] || 2
  sleep duration

  super(socket)
end