Documentation ¶
Overview ¶
The jsoncodec package provides a JSON codec for the rpc package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpRequest ¶
DumpRequest returns JSON-formatted data representing the RPC message with the given header and body, as it would be written by Codec.WriteMessage. If the body cannot be marshalled as JSON, the data will hold a JSON string describing the error.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
Codec implements rpc.Codec for a connection.
func NewNet ¶
NewNet returns an rpc codec that uses the given net connection to send and receive messages.
func NewWebsocket ¶
NewWebsocket returns an rpc codec that uses the given websocket connection to send and receive messages.
func (*Codec) SetLogging ¶
SetLogging sets whether messages will be logged by the codec.
Click to show internal directories.
Click to hide internal directories.