Networking utilities to create TCP clients and servers
const TCP_SERVER_PORT = 1234;const net = network.createServer((socket) => { console.log('socket connected!');});net.listen(TCP_SERVER_PORT, () => { console.log(`Server is listening on port ${TCP_SERVER_PORT}`);}); Copy
const TCP_SERVER_PORT = 1234;const net = network.createServer((socket) => { console.log('socket connected!');});net.listen(TCP_SERVER_PORT, () => { console.log(`Server is listening on port ${TCP_SERVER_PORT}`);});
Networking utilities to create TCP clients and servers
Example