binrpc

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Addr              string
	ResponseSizeLimit int64
}

Client provides access to an BIN-RPC server.

func (*Client) Call

func (c *Client) Call(method string, params xmlrpc.Values) (*xmlrpc.Value, error)

Call executes an remote procedure call. Call implements xmlrpc.Caller.

type Decoder

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

Decoder decodes BIN-RPC requests.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder create a Decoder.

func (*Decoder) DecodeRequest

func (d *Decoder) DecodeRequest() (string, xmlrpc.Values, error)

DecodeRequest decodes an BIN-RPC request.

func (*Decoder) DecodeResponse

func (d *Decoder) DecodeResponse() (*xmlrpc.Value, error)

DecodeResponse decodes a BIN-RPC response/fault. A received fault packet is returned as xmlrpc.MethodError.

type Encoder

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

Encoder encodes XML-RPC requests as BIN-RPC.

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

NewEncoder creates an encoder.

func (*Encoder) EncodeFault

func (e *Encoder) EncodeFault(fault error) error

EncodeFault encodes a XML-RPC fault.

func (*Encoder) EncodeRequest

func (e *Encoder) EncodeRequest(method string, params []*xmlrpc.Value) error

EncodeRequest encodes a XML-RPC request.

func (*Encoder) EncodeResponse

func (e *Encoder) EncodeResponse(value *xmlrpc.Value) error

EncodeResponse encodes a XML-RPC response.

type Server

type Server struct {
	xmlrpc.Dispatcher
	Addr             string
	ServeErr         chan<- error
	RequestSizeLimit int64
	// contains filtered or unexported fields
}

Server is a BIN-RPC server.

func (*Server) Start

func (s *Server) Start() error

Start starts the TCP server for handling BIN-RPC requests.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the TCP server.

Jump to

Keyboard shortcuts

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