lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Mar 31, 2020 at 3:41 AM Jeonghum Joh <> wrote:
> I am investigating UDP Unix Domain Socket APIs in luasocket.
> Diego Nehab provided TCP Unix Domain Socket sample code and I tested it successfully. I appreciate him for this email.

Unix domain sockets do not support UDP or TCP, they support Datagram
or Stream sockets. UDP and TCP are the datagram sockets for IP. Also,
on some places, unix domain sockets support sequence datagram ( which
is a mix, message oriented but reliable and ordered ) ( man 7 unix
could help ).

That being said, I'm not a luasocket, but this intrigued me, I had a
look at the source and it seems it just opens them in SOCK_STREAM
mode. Add to this the existence of different C source files for tcp
and udp ( and unix ) and it seems you just have SOCK_STREAM and
SOCK_DGRAM in AF_INET ( tcp and udp ) and SOCK_STREAM in AF_UNIX (
byte stream unix sockets ).

Francisco Olarte.