Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

coder82

🎯
Focusing
Block or report user

Report or block coder82

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Websocket modeled as "suspending"
import WebSocketAsPromised from 'websocket-as-promised';
import { sleep, waitFor } from 'globals/utils';
import { bind } from 'decko';
class Socket {
rcvArray = [];
constructor(url,
options = { packMessage: data => JSON.stringify(data), unpackMessage: message => JSON.deepParse(message) },
retryTime = 1000) {
You can’t perform that action at this time.