How to use the uws.OPEN function in uws

To help you get started, we’ve selected a few uws examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aerojs / aero / lib / LiveReload / index.js View on Github external
this.server.clients.forEach(client => {
			if(client.readyState !== WebSocket.OPEN)
				return

			try {
				client.send(dataString)
			} catch(error) {
				console.error(chalk.bold('LiveReload error: Sending data to a client...'))
				console.error(chalk.red(error))
			}
		})
	}
github lionsharecapital / lionshare-api / WebsocketServer.js View on Github external
this.wss.clients.forEach(client => {
      if (client.readyState === uws.OPEN) {
        try {
          client.ping();
        } catch (e) {
          console.log(e);
        }
      }
    });
  };
github AnotherGenZ / ManyMelodies / src / VoiceConnection.js View on Github external
sendWS(op, data) {
        if (this.ws && this.ws.readyState === WebSocket.OPEN) {
            data = JSON.stringify({ op: op, d: data });
            this.ws.send(data);
            this.emit('debug', data);
        }
    }
github lionsharecapital / lionshare-api / WebsocketServer.js View on Github external
this.wss.clients.forEach(client => {
      if (client.readyState === uws.OPEN) {
        try {
          client.send(data);
        } catch (e) {
          console.log(e);
        }
      }
    });
  };
github catamphetamine / webapp / backend / code / realtime-service / websocket service.js View on Github external
server.clients.forEach((client) =>
		{
			if (client.readyState === WebSocket.OPEN)
			{
				client.send(message)
			}
		})
	}
github krystianity / coinpusher / lib / SocketServer.js View on Github external
this.wss.clients.forEach(socket => {
            if (socket.readyState === WebSocket.OPEN) {
                socket.send(message)
            }
        });
    }

uws

## Go to [https://github.com/uNetworking/uWebSockets.js](https://github.com/uNetworking/uWebSockets.js).

Apache-2.0
Latest version published 4 years ago

Package Health Score

63 / 100
Full package analysis