fix ws reads by using channels

use channels to implement blocking on read.