forked from shokai/websocket-client-simple
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
The following section, reading data one byte at a time, is very slow when trying to handle MB-order packets.
websocket-client-simple/lib/websocket-client-simple/client.rb
Lines 46 to 49 in 857bc87
| unless recv_data = @socket.getc | |
| sleep 1 | |
| next | |
| end |
Simply replace with the following to speed up the process. I didn't make a pull request because I wasn't sure what to specify as a buffer size, but I hope you will consider replacing it.
recv_data = @socket.readpartial(4096*16)
unasuke
Metadata
Metadata
Assignees
Labels
No labels