Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
eventsocket
Advanced tools
Event socket
$ npm install eventsocket
var JsonSocket = require('eventsocket');
EventSocket(ip, port)
Create new event socket from ip and port.
var socket = new EventSocket('127.0.0.1', 7000);
EventSocket(socket)
Create new event socket from existingnet.Socket
or JsonSocket
var net = require('net');
var server = net.createServer(function (con) {
var socket = new JsonSocket(con);
}
emit(eventType, args...)
Send event over socket.
socket.emit('message',{foo: 'bar'});
disconnect()
Destroy connection
on(eventType, listener)
Inherited from events.EventEmitter
Emitted when socket connected (only when you pass ip, port).
Emitted when disconnected.
Emitted event from peer
You can enable logging. See more
# disabled logging
node test.js
# connect, disconnect log
DEBUG=EventSocket:connection node test.js
# data log
DEBUG=EventSocket:data node test.js
# all json socket logs
DEBUG=EventSocket:* node test.js
We send json objects over socket then write one \0
. This is c/c++ friendly protocol. :smile:
Json object has name
and args
property. name
must be string and args
must be array.
{"name":"message","args":[{"foo":"bar"}]}\0
FAQs
Event socket
The npm package eventsocket receives a total of 1 weekly downloads. As such, eventsocket popularity was classified as not popular.
We found that eventsocket 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.