|
From: | Pinnacle Systems Group |
Subject: | Re: Connect to Unix domain socket instead of host:port |
Date: | Thu, 19 Dec 2024 08:58:17 -0500 |
It's possible to configure gpsd to use a UNIX domain socket instead of the typical TCP host:port setup.
Depending on your requirements, you can achieve this for either the GNSS receiver connection or the client connection to gpsd.
If your GNSS receiver communicates via a UNIX domain socket, you can specify the device using its path. For example:
gpsd /path/to/socket
This assumes the socket file /path/to/socket is accessible and provides the appropriate GNSS data stream.
To allow clients to connect to gpsd through a UNIX domain socket, you can specify the socket path when starting gpsd. Use the -S flag to disable the default TCP listener and instead specify a UNIX socket path with the -F flag:
gpsd -F /path/to/gpsd.sock
Clients (e.g., cgps, custom scripts, etc.) can connect to gpsd using the socket file /path/to/gpsd.sock instead of a TCP port.
Make sure the socket file permissions allow client access.
For a client to connect via a UNIX domain socket, tools like gpsmon or cgps should be configured to point to the socket path, e.g.:
cgps -s -F /path/to/gpsd.sock
If using a UNIX domain socket, ensure that both the gpsd server and the client have the appropriate permissions to access the socket.
This approach is often used to improve security and reduce overhead by avoiding TCP communication.
Riley
Yo Andreas!
On Wed, 18 Dec 2024 22:58:43 +0100
Andreas B <panden@gmail.com> wrote:
> Is it possible to run gpsd so that one connects to a Unix domain
> socket, instead of host:port?
I can't imagine why not. Do want gpsd to connect to the GNSS receiver
over a UNIX Domain Socket, or have a client connect to gpsd that way?
Do you have an example receiver or client?
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
[Prev in Thread] | Current Thread | [Next in Thread] |