Skip to content

Instantly share code, notes, and snippets.

@Ebycow
Created November 19, 2020 14:53
Show Gist options
  • Save Ebycow/16ed79e07402a086eed9af17cc9675aa to your computer and use it in GitHub Desktop.
Save Ebycow/16ed79e07402a086eed9af17cc9675aa to your computer and use it in GitHub Desktop.
NeosVR ゆかりねっと
const net = require('net');
const ws = require('ws')
const wserver = new ws.Server({port:2783}, () => console.log("ws open on port 2783"))
wserver.on('connection', (socket) => {
console.log("Neos Client connected")
});
const server = net.createServer(function(conn){
conn.on('data', function(data){
console.log("conn and recv data", data)
const text = data.slice(15).toString().slice(0,-1)
console.log(text)
conn.write("")
for (const client of wserver.clients) {
console.log("send!")
client.send(text)
}
});
conn.on('error', (error) => {
console.error(error)
});
conn.on('close', function(){
console.log("conn successfully close")
});
}).listen(50001);
console.log('listening on boyomi port 50001');
@Ebycow
Copy link
Author

Ebycow commented Nov 19, 2020

ゆかりねっとの「棒読みちゃん連携」を有効にしてください

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment