wrapper

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	Read() ([]byte, error)
	Write(message []byte) error

	ReadJSON(obj interface{}) error
	WriteJSON(obj interface{}) error

	Close() error

	SetReadDeadline(t time.Time) error
}

Conn conn

func NewWrapper

func NewWrapper(connType string, conn interface{}, buffSize int) Conn

NewWrapper new wrapper

type ConnWrapper

type ConnWrapper struct {
	// contains filtered or unexported fields
}

ConnWrapper conn wrapper

func (*ConnWrapper) Close

func (w *ConnWrapper) Close() error

Close close

func (*ConnWrapper) Read

func (w *ConnWrapper) Read() ([]byte, error)

Read read

func (*ConnWrapper) ReadJSON

func (w *ConnWrapper) ReadJSON(obj interface{}) error

ReadJSON read json

func (*ConnWrapper) SetReadDeadline

func (w *ConnWrapper) SetReadDeadline(t time.Time) error

SetReadDeadline set read deadline

func (*ConnWrapper) Write

func (w *ConnWrapper) Write(message []byte) error

Write write

func (*ConnWrapper) WriteJSON

func (w *ConnWrapper) WriteJSON(obj interface{}) error

WriteJSON write json

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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