stdio

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyConnections = errors.New("too many connections")
)

Functions

func Dial

func Dial(in io.ReadCloser, out io.WriteCloser, binder jsonrpc2.Binder, onDone func()) (*jsonrpc2.Connection, error)

Dial makes a new connection based on in and out, wraps the returned reader and writer using the framer to make a stream, and then builds a connection on top of that stream using the binder.

The returned Connection will operate independently using the Preempter and/or Handler provided by the Binder, and will release its own resources when the connection is broken, but the caller may Close it earlier to stop accepting (or sending) new requests.

func Dialer

func Dialer(in io.ReadCloser, out io.WriteCloser) jsonrpc2.Dialer

Dialer returns a jsonrpc2.Dialer based on in and out.

func Listener

func Listener(allowLocalDail bool) jsonrpc2.Listener

Listener returns a jsonrpc2.Listener based on stdin and stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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