rename unix.tcp to unix.stream, unix.udp to unix.dgram
This commit is contained in:
parent
ac3201d620
commit
3a33c37b9c
11 changed files with 129 additions and 129 deletions
|
@ -1,7 +1,7 @@
|
|||
socket = require"socket"
|
||||
socket.unix = require"socket.unix"
|
||||
c = assert(socket.unix.udp())
|
||||
c:bind("/tmp/bar")
|
||||
c = assert(socket.unix.dgram())
|
||||
print(c:bind("/tmp/bar"))
|
||||
while 1 do
|
||||
local l = io.read("*l")
|
||||
assert(c:sendto(l, "/tmp/foo"))
|
|
@ -1,6 +1,6 @@
|
|||
socket = require"socket"
|
||||
socket.unix = require"socket.unix"
|
||||
u = assert(socket.unix.udp())
|
||||
u = assert(socket.unix.dgram())
|
||||
assert(u:bind("/tmp/foo"))
|
||||
while 1 do
|
||||
x, r = assert(u:receivefrom())
|
|
@ -1,6 +1,6 @@
|
|||
socket = require"socket"
|
||||
socket.unix = require"socket.unix"
|
||||
c = assert(socket.unix.tcp())
|
||||
c = assert(socket.unix.stream())
|
||||
assert(c:connect("/tmp/foo"))
|
||||
while 1 do
|
||||
local l = io.read()
|
|
@ -1,6 +1,6 @@
|
|||
socket = require"socket"
|
||||
socket.unix = require"socket.unix"
|
||||
u = assert(socket.unix.tcp())
|
||||
u = assert(socket.unix.stream())
|
||||
assert(u:bind("/tmp/foo"))
|
||||
assert(u:listen())
|
||||
c = assert(u:accept())
|
Loading…
Add table
Add a link
Reference in a new issue