![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
JSON socket
$ npm install jsonsocket
var JsonSocket = require('jsonsocket');
JsonSocket(ip, port)
Create new json socket from ip and port.
var socket = new JsonSocket('127.0.0.1', 7000);
JsonSocket(socket)
Create new json socket from existingnet.Socket
var net = require('net');
var server = net.createServer(function (con) {
var socket = new JsonSocket(con);
}
write(data)
Send object over socket.
socket.write({foo: 'bar'});
disconnect()
Destroy connection
on(eventType, listener)
Inherited from events.EventEmitter
.
Emitted when net.Socket emit error.
Error events are treated as a special case in node. If there is no listener for it, then the default action is to print a stack trace and exit the program.
Inherited from EventEmitter.
Emitted when socket connected (only when you pass ip, port).
Emitted when full json received.
socket.on('json', function (json) {
console.log(json);
}
Emitted when disconnected.
You can enable logging. See more
# disabled logging
node test.js
# connect, disconnect log
DEBUG=JsonSocket:connection node test.js
# data log
DEBUG=JsonSocket:data node test.js
# all json socket logs
DEBUG=JsonSocket:* node test.js
We send json objects over socket then write one \0
. This is c/c++ friendly protocol. :smile:
{"x": 3}\0null\0"Hi"\0[]\0
FAQs
JSON socket
The npm package jsonsocket receives a total of 5 weekly downloads. As such, jsonsocket popularity was classified as not popular.
We found that jsonsocket 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.