MCPcopy
hub / github.com/lhartikk/naivechain / initP2PServer

Function initP2PServer

main.js:57–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57var initP2PServer = () => {
58 var server = new WebSocket.Server({port: p2p_port});
59 server.on('connection', ws => initConnection(ws));
60 console.log('listening websocket p2p port on: ' + p2p_port);
61
62};
63
64var initConnection = (ws) => {
65 sockets.push(ws);

Callers 1

main.jsFile · 0.85

Calls 1

initConnectionFunction · 0.85

Tested by

no test coverage detected