Does `open socket` work with unix domain sockets?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 962
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas

Does `open socket` work with unix domain sockets?

Post by trevordevore » Fri Apr 05, 2019 10:57 pm

I'm experimenting with watchman and trying to use the socket interface. It uses a unix domain socket. From the command line I can get the path to the file by issuing the following command:

Code: Select all

watchman get-sockname
The output providers the path to the file:

Code: Select all

    "version": "4.9.0",
    "sockname": "/usr/local/var/run/watchman/USERNAME-state/sock"
I tried connecting with `open socket` but I get an error about resolving the domain:

Code: Select all

open socket to "/usr/local/var/run/watchman/USERNAME-state/sock" with message "ConnectionMade"
  if the result is not empty then
    answer the result
  end if
I also tried prefixing the file path with udg:// and file:// but not luck.

Are unix domain sockets supported in LiveCode?
Trevor DeVore
ScreenSteps -

Levure Application Framework:
LiveCode Resources for Developers:

Post Reply

Return to “Talking LiveCode”