files
syscalls/doc/manual.md

978 B

Manual

local syscalls = require("syscalls")

Events

syscalls.Event.<EventName>

Graphic

Sockets

OpenSocket

local socket, err = syscalls.OpenSocket()

if err then
	print("Error", err)
else
	print("Ok")
end

CloseSocket(socket)

PairSocket()

local first, second = PairSocket()

if first then
	print("OK")
else
	print("Error:", second)
end

Bind(socket, address)

Listen(socket, backlog)

Connect()

Accept

Receive

SetSocketOption

GetSocketOption

Socket types

syscalls.SOCK.<Value>
  • STREAM
  • RAW
  • DGRAM

Address families

syscalls.AF.<Value>
  • UNSPEC
  • LOCAL
  • INET
  • INET4
  • INET6

IP options

syscalls.IP.<Value>
  • TTL

IP protocols

syscalls.IPPROTO.<Value>
  • IP
  • ICMP
  • TCP
  • UDP
  • RAW

Socket options

syscalls.SO.<Value>
  • BINDTODEVICE
  • NONBLOCK