Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. function* handleWs() {
  2. const channel = yield call(createSocketChannel, ws);
  3. while (true) {
  4. const { endpoint, payload } = yield take(channel);
  5. yield put({ type: endpoint, payload });
  6. }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement