title: GLX glXQueryVersion returns error of "wrong opcode". Unix socket connection
body: <p>The connection to the <code>X</code> server is done with Unix sockets. I can confirm that the server has <code>GLX</code> extension with the following code:</p>
  <pre><code>  const char *str_extension = &quot;GLX&quot;;
  /* X protocol requires requests to be in 4 byte units */
    ssize_t     len       = ((strlen(str_extension + 1) + 3) &amp; ~3; 
    char        pad_str_extension[3 + l];
    rq_q_extension_t  rq = {
     .opcode = X11_OPCODE_QUERY_EXTENSION,
     .len    = 2 + len / 4,
     .len_nm = strlen(str_extension),
    };
  
    memcpy(pad_str_extension, str_extension, strlen(str_extension));
  
    rp_q_extension_t  rp;
  
    if(write(fd, &amp;rq, sizeof(rq)) &lt; (ssize_t)sizeof(rq))
     ERROR;
    if(write(fd, cbf, 3 + l) &lt; (3 + l))
     ERROR;
    if(read(fd, &amp;rp, sizeof(rp)) &lt; (ssize_t)sizeof(rp))
     ERROR;
    printf(&quot;GLX present   : %u\n&quot;, rp.present);
    printf(&quot;\tmajor_code  : %u\n&quot;, rp.major_code);
    printf(&quot;\tfirst_event : %u\n&quot;, rp.first_event);
    printf(&quot;\tfirst_error : %u\n&quot;, rp.first_error);
  </code></pre>
  <p>The above outputs that extension is present and has <code>1.4</code> version. <strong>My problem is that the next request fails</strong>.</p>
  <pre><code>  rq_gxl_q_version_t  rq = {
     .opcode_x11 = glx_base_opcode,
     .opcode_glx = X11_OPCODE_GLX_QUERYVERSION,
     .len        = sizeof(rq_gxl_q_version_t) / 4,
     .major_version = 1,
     .m1nor_version = 4,
    };
    rp_glx_q_version_t rp;
  
    if(write(fd, &amp;rq, sizeof(rq)) &lt; (ssize_t)sizeof(rq))
     ERROR;
    if(read(fd, &amp;rp, sizeof(rp)) &lt; (ssize_t)sizeof(rp))
     ERROR;
  
    /* status is zero here */
    if(!rp.status){
     x11_rp_error_t* e_rp = (x11_rp_error_t*)&amp;rp;
  </code></pre>
  <p>This request fails with the &quot;wrong opcode&quot; error code. I've spend few days investigating the failure, still can't find a cuse of it.</p>