private void init_server_info (ResponseInputStream i) {

    int accepted = i.read_int8();
    if (accepted == 0) { System.err.println ("failed"); }
    if (accepted == 2) { System.err.println ("more auth data not yet implemented"); }

    i.skip (1); // Unused.
    i.skip (2); // protocol-major-version.
    i.skip (2); // protocol-minor-version.
    i.skip (2); // Length.

    release_no = i.read_int32 ();
    resource_base = i.read_int32 ();
    resource_mask = i.read_int32 ();
    i.skip (4); // motion-buffer-size.

    int vendor_length = i.read_int16 ();
    extended_maximum_request_length 
      = maximum_request_length = i.read_int16 ();
    int screen_count = i.read_int8 ();
    int pixmap_format_count = i.read_int8 ();

    image_byte_order = i.read_int8 ();
    bitmap_format_bit_order = i.read_int8 ();
    bitmap_format_scanline_unit = i.read_int8 ();
    bitmap_format_scanline_pad = i.read_int8 ();

    min_keycode = i.read_int8 ();
    max_keycode = i.read_int8 ();
    i.skip (4); // Unused.

    vendor = i.read_string8 (vendor_length);
    i.pad (vendor_length);

    // pixmap formats
    pixmap_formats = new Pixmap.Format [pixmap_format_count];
    for (int j = 0; j < pixmap_format_count; j++) {
      pixmap_formats [j] = new Pixmap.Format (i);
    }

    // screens

    if (default_screen_no < 0 || default_screen_no >= screen_count)    
      throw new RuntimeException ("Invalid screen number (screen-count "
        + screen_count + "): " + default_screen_no);

    screens = new Screen [screen_count];
    for (int j = 0; j < screen_count; j++) {
      screens [j] = new Screen (this, i);
      //System.err.println("screen: " + screens [j]);
    }

  }