mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-07-04 16:23:41 +02:00
doc fixes
This commit is contained in:
parent
f498bfa550
commit
85ee4c48f5
1 changed files with 3 additions and 2 deletions
|
|
@ -169,8 +169,9 @@ func (VSCodeObjectCodec) ReadObject(stream *bufio.Reader, v interface{}) error {
|
||||||
return json.NewDecoder(io.LimitReader(stream, int64(contentLength))).Decode(v)
|
return json.NewDecoder(io.LimitReader(stream, int64(contentLength))).Decode(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEPRECATED: use NewPlainObjectStream
|
|
||||||
// PlainObjectCodec reads/writes plain JSON-RPC 2.0 objects without a header.
|
// PlainObjectCodec reads/writes plain JSON-RPC 2.0 objects without a header.
|
||||||
|
//
|
||||||
|
// Deprecated: use NewPlainObjectStream
|
||||||
type PlainObjectCodec struct {
|
type PlainObjectCodec struct {
|
||||||
decoder *json.Decoder
|
decoder *json.Decoder
|
||||||
encoder *json.Encoder
|
encoder *json.Encoder
|
||||||
|
|
@ -192,6 +193,7 @@ func (c PlainObjectCodec) ReadObject(stream *bufio.Reader, v interface{}) error
|
||||||
return json.NewDecoder(stream).Decode(v)
|
return json.NewDecoder(stream).Decode(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// plainObjectStream reads/writes plain JSON-RPC 2.0 objects without a header.
|
||||||
type plainObjectStream struct {
|
type plainObjectStream struct {
|
||||||
conn io.Closer
|
conn io.Closer
|
||||||
decoder *json.Decoder
|
decoder *json.Decoder
|
||||||
|
|
@ -199,7 +201,6 @@ type plainObjectStream struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
// plainObjectStream reads/writes plain JSON-RPC 2.0 objects without a header.
|
|
||||||
func NewPlainObjectStream(conn io.ReadWriteCloser) ObjectStream {
|
func NewPlainObjectStream(conn io.ReadWriteCloser) ObjectStream {
|
||||||
os := &plainObjectStream{conn: conn}
|
os := &plainObjectStream{conn: conn}
|
||||||
os.encoder = json.NewEncoder(conn)
|
os.encoder = json.NewEncoder(conn)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue