net.nim: add support for Unix sockets
This commit is contained in:
parent
8e4b5e10ba
commit
da308be2d7
5 changed files with 57 additions and 2 deletions
6
examples/unix_socket/client.nim
Normal file
6
examples/unix_socket/client.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import net
|
||||
|
||||
let sock = newSocket(AF_UNIX, SOCK_STREAM, IPPROTO_IP)
|
||||
|
||||
sock.connectUnix("sock")
|
||||
sock.send("hello\n")
|
||||
Loading…
Add table
Add a link
Reference in a new issue