jsonSubProto

package
v4.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package jsonSubProto is implemented JSON socket communication protocol.

Index

Constants

This section is empty.

Variables

View Source
var NewJsonSubProtoFunc = func(rw io.ReadWriter) tp.Proto {
	var (
		readBufioSize             int
		readBufferSize, isDefault = tp.SocketReadBuffer()
	)
	if isDefault {
		readBufioSize = 1024 * 4
	} else if readBufferSize == 0 {
		readBufioSize = 1024 * 35
	} else {
		readBufioSize = readBufferSize / 2
	}
	return &jsonSubProto{
		id:   'j',
		name: "json",
		r:    bufio.NewReaderSize(rw, readBufioSize),
		w:    rw,
	}
}

NewJsonSubProtoFunc is creation function of JSON socket protocol.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL