
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
tube-socket
Advanced tools
A library to support tubes! This wraps a WebSocket functionality and can be used as a websocket with some changes!
Instead of a URL you can just pass your room ID.
import TubeSocket from 'tube-socket';
const conn = new TubeSocket('F3A00E');
conn.addEventListener('message', (evt) => {
const payload = JSON.parse(evt.data);
switch(payload.action) {
case 'chat_message':
console.log(payload.message);
break;
}
});
conn.sendJSONTonpm i tube-socket --save-dev
TubeSocket(roomID) Returns a newly created TubeSocket object.TubeSocket.isConnected A boolean value if the client is currently connected.TubeSocket.isLeader A boolean value if the client is currently the leader of all the clients.TubeSocket.clientCount A count of clients that are all connected to the current channel.TubeSocket.onclose An event listener to be called when the connection is closed.TubeSocket.onerror An event listener to be called when an error occurs.TubeSocket.onmessage An event listener to be called when a message is received from the server.TubeSocket.onopen An event listener to be called when the connection is opened.TubeSocket.url The absolute URL of the TubeSocket.TubeSocket.send(string) Enqueues data to be transmitted.TubeSocket.sendJSON(object) Serializes an object before enqueing the data to be transmitted.TubeSocket.sendJSONTo(client_id, object) Serializes an object and adding a to field, before enqueing the data to be transmittedTubeSocket.sendJSONToLeader(object) Serializes an object and adding a to field directly to the leader, before enqueing the data to be transmittedListen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.
close Fired when a connection with a TubeSocket is closed. Also available via the onclose propertyerror Fired when a connection with a TubeSocket has been closed because of an error, such as when some data couldn't be sent. Also available via the onerror property.message Fired when data is received through a TubeSocket. Also available via the onmessage property.open Fired when a connection with a TubeSocket is opened. Also available via the onopen property.FAQs
Your gateway to tubes.dev development
The npm package tube-socket receives a total of 6 weekly downloads. As such, tube-socket popularity was classified as not popular.
We found that tube-socket demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.