xmlrpc

package
v0.0.0-...-d395cb5 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package xmlrpc implements the XML-RPC protocol, in a variant fit for ROS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerURL

func ServerURL(host string, address *net.TCPAddr, port int) string

ServerURL returns a XMLRPC server url.

Types

type Client

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

Client is a XML-RPC client.

func NewClient

func NewClient(address string) *Client

NewClient allocates a Client.

func (*Client) Do

func (c *Client) Do(method string, paramsReq interface{}, paramsRes interface{}) error

Do writes a request and reads a response.

type ErrorRes

type ErrorRes struct{}

ErrorRes is a special response that sends status code 400. in case of errors, the C++ implementation replies with <methodResponse><fault><value>..., a structure which would require additional parsing.

type RequestRaw

type RequestRaw struct {
	Method string
	// contains filtered or unexported fields
}

RequestRaw is a raw request.

func (*RequestRaw) Decode

func (rr *RequestRaw) Decode(req interface{}) error

Decode transforms a RequestRaw into a Request.

type Server

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

Server is a XML-RPC server.

func NewServer

func NewServer(address string) (*Server, error)

NewServer allocates a server.

func (*Server) Close

func (s *Server) Close() error

Close closes all the server resources.

func (*Server) Port

func (s *Server) Port() int

Port returns the server port.

func (*Server) Serve

func (s *Server) Serve(handler func(*RequestRaw) interface{})

Serve starts serving requests and waits until the server is closed.

Jump to

Keyboard shortcuts

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