package
0.0.0-20241115082555-91616abce05b
Repository: https://github.com/tencentcodedog/linux-go-1.12.6.git
Documentation: pkg.go.dev

# Packages

Package jsonrpc implements a JSON-RPC 1.0 ClientCodec and ServerCodec for the rpc package.

# Functions

Accept accepts connections on the listener and serves requests to DefaultServer for each incoming connection.
Dial connects to an RPC server at the specified network address.
DialHTTP connects to an HTTP RPC server at the specified network address listening on the default HTTP RPC path.
DialHTTPPath connects to an HTTP RPC server at the specified network address and path.
HandleHTTP registers an HTTP handler for RPC messages to DefaultServer on DefaultRPCPath and a debugging handler on DefaultDebugPath.
NewClient returns a new Client to handle requests to the set of services at the other end of the connection.
NewClientWithCodec is like NewClient but uses the specified codec to encode requests and decode responses.
NewServer returns a new Server.
Register publishes the receiver's methods in the DefaultServer.
RegisterName is like Register but uses the provided name for the type instead of the receiver's concrete type.
ServeCodec is like ServeConn but uses the specified codec to decode requests and encode responses.
ServeConn runs the DefaultServer on a single connection.
ServeRequest is like ServeCodec but synchronously serves a single request.

# Constants

No description provided by the author
Defaults used by HandleHTTP.

# Variables

DefaultServer is the default instance of *Server.
No description provided by the author

# Structs

Call represents an active RPC.
Client represents an RPC Client.
Request is a header written before every RPC call.
Response is a header written before every RPC return.
Server represents an RPC Server.

# Interfaces

A ClientCodec implements writing of RPC requests and reading of RPC responses for the client side of an RPC session.
A ServerCodec implements reading of RPC requests and writing of RPC responses for the server side of an RPC session.

# Type aliases

ServerError represents an error that has been returned from the remote side of the RPC connection.