Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env luajit
- local fn = "/tmp/ffsock"
- --Trying to connect to running beanstalkd
- os.execute("socat -d -d -d pty,link="..fn..",raw tcp:localhost:11300")
- os.execute("sleep 1")
- local writer = io.open(fn,"w")
- local reader = io.open(fn,"r")
- writer:write("invalidcommand\r\n")
- writer:flush()
- local txt = reader:read("*l")
- print("Got response: "..txt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement