Method: Usbmux::SafeStreamSocket#receive
- Defined in:
- lib/usbmux/usbmux.rb
#receive(size) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/usbmux/usbmux.rb', line 28 def receive(size) = '' while .length < size chunk = @sock.recv(size - .length) if chunk.empty? raise MuxError.new('Socket connection broken') end = + chunk end end |