Skip to content

Instantly share code, notes, and snippets.

Created December 4, 2014 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/82f5204e54fd56fa9fc3 to your computer and use it in GitHub Desktop.
Save anonymous/82f5204e54fd56fa9fc3 to your computer and use it in GitHub Desktop.
something lua this way comes
local uv = require("uv")
local server = uv.Tcp:new()
server:bind("127.0.0.1", 6380)
server:listen(function(error)
print("New client connected")
local client = uv.Tcp:new()
server:accept(client)
client:write("Hello!\n")
end, 128)
print("Listening on :6380")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment