Class: Nonnative::DelaySocketPair
- Inherits:
-
SocketPair
- Object
- SocketPair
- Nonnative::DelaySocketPair
- Defined in:
- lib/nonnative/delay_socket_pair.rb
Instance Method Summary collapse
Methods inherited from SocketPair
Constructor Details
This class inherits a constructor from Nonnative::SocketPair
Instance Method Details
#read(socket) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/nonnative/delay_socket_pair.rb', line 5 def read(socket) Nonnative.logger.info "delaying socket '#{socket.inspect}' for 'delay' pair" duration = proxy.[:delay] || 2 sleep duration super end |