Unix Domain Sockets allow for better performance than TCP and is preferable if node-q is being utilized on the same machine as the KDB/Q server. Changes don't work with KDB 3.5+ on Linux as it utilizes the abstract namespace for Unix Domain Sockets and the "net" module doesn't support connecting to those sockets (there is a module called "abstract-socket" that adds this support). This will work on older versions of KDB and on MacOS.
Connecting by TCP still works the same as before. Below code is for connecting by Unix Domain Sockets, also supports authentication with username and password.
Unix Domain Sockets allow for better performance than TCP and is preferable if node-q is being utilized on the same machine as the KDB/Q server. Changes don't work with KDB 3.5+ on Linux as it utilizes the abstract namespace for Unix Domain Sockets and the "net" module doesn't support connecting to those sockets (there is a module called "abstract-socket" that adds this support). This will work on older versions of KDB and on MacOS.
Connecting by TCP still works the same as before. Below code is for connecting by Unix Domain Sockets, also supports authentication with username and password.