<commit_before>/*
Server implements RFC 6143 §7.6 Server-to-Client Messages.

See http://tools.ietf.org/html/rfc6143#section-7.6 for more info.
*/
package vnc

import (
	"encoding/binary"
	"fmt"
	"io"
)

const (
	framebufferUpdateMsg = iota
	setColorMapEntriesMsg
	bellMsg
	serverCutTextMsg
)

// A ServerMessage implements a message sent from the server to the client.
type ServerMessage interface {
	// The type of the message that is sent down on the wire.
	Type() uint8

	// Read reads the contents of the message from the reader. At the point
	// this is called, the message type has already been read from the reader.
	// This should return a new ServerMessage that is the appropriate type.
	Read(*ClientConn, io.Reader) (ServerMessage, error)
}

// FramebufferUpdate consists of a sequence of rectangles of
// pixel data that the client should put into its framebuffer.
type FramebufferUpdate struct {
	Rectangles []Rectangle
}<commit_msg>forced type of constants to uint8<commit_after>/*
Server implements RFC 6143 §7.6 Server-to-Client Messages.

See http://tools.ietf.org/html/rfc6143#section-7.6 for more info.
*/
package vnc

import (
	"encoding/binary"
	"fmt"
	"io"
)

const (
	framebufferUpdateMsg = uint8(iota)
	setColorMapEntriesMsg
	bellMsg
	serverCutTextMsg
)

// A ServerMessage implements a message sent from the server to the client.
type ServerMessage interface {
	// The type of the message that is sent down on the wire.
	Type() uint8

	// Read reads the contents of the message from the reader. At the point
	// this is called, the message type has already been read from the reader.
	// This should return a new ServerMessage that is the appropriate type.
	Read(*ClientConn, io.Reader) (ServerMessage, error)
}

// FramebufferUpdate consists of a sequence of rectangles of
// pixel data that the client should put into its framebuffer.
type FramebufferUpdate struct {
	Rectangles []Rectangle
}
{'fraction_non_alphanumeric': 0.0760812923397603, 'fraction_numerical': 0.014590932777488274, 'mean_word_length': 3.948453608247423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2420588', 'n_tokens_mistral': 575, 'n_tokens_neox': 558, 'n_words': 241}