mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 14:14:30 +02:00
rename unix.tcp to unix.stream, unix.udp to unix.dgram
This commit is contained in:
9
test/unixdgramclnt.lua
Normal file
9
test/unixdgramclnt.lua
Normal file
@ -0,0 +1,9 @@
|
||||
socket = require"socket"
|
||||
socket.unix = require"socket.unix"
|
||||
c = assert(socket.unix.dgram())
|
||||
print(c:bind("/tmp/bar"))
|
||||
while 1 do
|
||||
local l = io.read("*l")
|
||||
assert(c:sendto(l, "/tmp/foo"))
|
||||
print(assert(c:receivefrom()))
|
||||
end
|
Reference in New Issue
Block a user