I’ve been chatting with ChatGPT trying to learn more about the “mpv” video player software that is a recommended replacement for the now defunct “omxplayer”. I was able to control the omxplayer with dbus commands, but, the new mpv video player uses a JSON API through a UNIX socket.
ChatGPT says that Xojo’s native TCPSocket isn’t compatible with UNIX sockets. Here’s what ChatGPT offers as a solution:
How to Properly Use UNIX Sockets in Xojo
- You must use declares to call the underlying POSIX socket API functions (
socket(),connect(),send(),recv()) directly. - This is advanced and requires handling file descriptors and data buffers manually.
Has anyone here used UNIX sockets communication in Xojo?