Skip to content
This repository
tree: 7bc95e052e
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (9 sloc) 0.299 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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")
Something went wrong with that request. Please try again.