Class: WebSocketClient::ByteSource

Inherits:
Object
  • Object
show all
Defined in:
lib/websocket_client/byte_source.rb

Instance Method Summary collapse

Instance Method Details

#getbytes(num) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/websocket_client/byte_source.rb', line 5

def getbytes(num)
  bytes = []
  1.upto( num ) do
    break if ( eof? )
    bytes << getbyte()
  end
  bytes
end