Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (9 sloc) 299 Bytes
local net = require('net')
local server
server = net.createServer(function (client)
-- Echo everything the client says back to itself
client:pipe(client)
-- Also log it to the server's stdout
client:pipe(process.stdout)
end):listen(8080)
print("TCP echo server listening on port 8080")
Jump to Line
Something went wrong with that request. Please try again.