File: bigreq.go

package info (click to toggle)
golang-github-linuxdeepin-go-x11-client 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,784 kB
  • sloc: python: 944; sh: 38; makefile: 17
file content (28 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

package bigrequests

import "github.com/linuxdeepin/go-x11-client"

// #WREQ
func encodeEnable() (b x.RequestBody) {
	return
}

type EnableReply struct {
	MaximumRequestLength uint32
}

func readEnableReply(r *x.Reader, v *EnableReply) error {
	if !r.RemainAtLeast4b(3) {
		return x.ErrDataLenShort
	}

	r.ReadPad(8)

	v.MaximumRequestLength = r.Read4b() // 3

	return nil
}