diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2017-01-04 18:41:31 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 18:41:31 -0200 |
commit | a0baab5f3c041afdb66bbda951a07943b022d4ca (patch) | |
tree | e481f825991151cd164435faeb4b5e1b779526ae /test/unixstreamclnt.lua | |
parent | ac3201d62024b397e8d6e3376822176d681811ec (diff) | |
parent | 3a33c37b9ce852d0b3531e82c6ffdb47bb937f0a (diff) | |
download | luasocket-a0baab5f3c041afdb66bbda951a07943b022d4ca.tar.gz luasocket-a0baab5f3c041afdb66bbda951a07943b022d4ca.tar.bz2 luasocket-a0baab5f3c041afdb66bbda951a07943b022d4ca.zip |
Merge pull request #199 from enginix/master
Rename unix.tcp to unix.stream, unix.udp to unix.dgram
Diffstat (limited to 'test/unixstreamclnt.lua')
-rw-r--r-- | test/unixstreamclnt.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unixstreamclnt.lua b/test/unixstreamclnt.lua new file mode 100644 index 0000000..4f2e1e3 --- /dev/null +++ b/test/unixstreamclnt.lua | |||
@@ -0,0 +1,8 @@ | |||
1 | socket = require"socket" | ||
2 | socket.unix = require"socket.unix" | ||
3 | c = assert(socket.unix.stream()) | ||
4 | assert(c:connect("/tmp/foo")) | ||
5 | while 1 do | ||
6 | local l = io.read() | ||
7 | assert(c:send(l .. "\n")) | ||
8 | end | ||