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
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 957
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

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 - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

Post Reply

Return to “Talking LiveCode”