@@ -17,6 +17,7 @@ for the development of future client applications.
1717- [ 3. Authentication] ( #3-authentication )
1818 - [ 3.1. Possible responses to an authentication request] ( #31-possible-responses-to-an-authentication-request )
1919 - [ 3.2. The Merovingian redirect] ( #32-the-merovingian-redirect )
20+ - [ 3.3. Connecting through a Unix domain socket] ( #33-connecting-through-a-unix-domain-socket )
2021- [ 4. Commands and queries in a nutshell] ( #4-commands-and-queries-in-a-nutshell )
2122- [ 5. Response types] ( #5-response-types )
2223 - [ 5.1. Redirect - ** ^** ] ( #51-redirect--- )
@@ -46,7 +47,8 @@ started by the main.
4647
4748If the client application is connecting through a UNIX domain socket, then monetdbd
4849will try to redirect the connection to mserver5 so that the client then talks directly
49- to mserver5 and monetdbd is no longer involved.
50+ to mserver5 and monetdbd is no longer involved. See the [ specific chapter] ( #33-connecting-through-a-unix-domain-socket )
51+ for more information.
5052
5153If the client is connecting through TCP/IP, then by default monetdbd will act
5254as a proxy, transferring data packages between the client and the mserver5 processs.
@@ -101,6 +103,11 @@ which has the header:
101103
102104 (0x10E1 << 1) | 0x0001 = 0x21C3
103105
106+ Be aware that there are two kinds of bit shifts: the [ logical] ( https://en.wikipedia.org/wiki/Logical_shift )
107+ and the [ arithmetic] ( https://en.wikipedia.org/wiki/Arithmetic_shift ) . The arithmetic might
108+ bring ones in from the left or right instead of zeros, therefore it should be avoided.
109+ Many languages will do a logical shift on unsigned types, and arithmetic on unsigned.
110+
104111If the message contains 12345 bytes, then there are two packages. The first
105112contains 8190 bytes, while the second the remaining 4155. The ` is_last ` bit
106113is only set for the second:
@@ -227,6 +234,16 @@ the client reads twice.
227234If the redirect happens more than 10 times, then throw an error in the client application,
228235because this shows an error on the server side.
229236
237+ ## 3.3. Connecting through a Unix domain socket
238+
239+ This case is the same as the TCP/IP connection, with a tiny difference at the very
240+ beginning. When connecting to a Unix domain socket, then the client has to first
241+ write a single byte (without any packet frame!) with value 0x30 or the chracter
242+ zero '0'.
243+
244+ After that, the server will respond with the ` server challenge ` and everything is the
245+ same as in the TCP/IP case.
246+
230247# 4. Commands and queries in a nutshell
231248
232249After a successful authentication, the client can start to send requests to the server
0 commit comments