summaryrefslogtreecommitdiff
path: root/vendor/github.com/ugorji/go/codec/rpc.go
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-02-25 13:12:40 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-25 12:12:40 +0000
commitecdc8379fa8f9d88faca626e7de748c2afbe4910 (patch)
tree8c20a5826db2136fc89bee45e15355c5899fa65b /vendor/github.com/ugorji/go/codec/rpc.go
parent[bugfix] Fix deleted status causing issues when getting bookmark (#1551) (diff)
downloadgotosocial-ecdc8379fa8f9d88faca626e7de748c2afbe4910.tar.xz
[chore] Update gin to v1.9.0 (#1553)
Diffstat (limited to 'vendor/github.com/ugorji/go/codec/rpc.go')
-rw-r--r--vendor/github.com/ugorji/go/codec/rpc.go36
1 files changed, 19 insertions, 17 deletions
diff --git a/vendor/github.com/ugorji/go/codec/rpc.go b/vendor/github.com/ugorji/go/codec/rpc.go
index cf72377c7..0da8ad577 100644
--- a/vendor/github.com/ugorji/go/codec/rpc.go
+++ b/vendor/github.com/ugorji/go/codec/rpc.go
@@ -198,29 +198,31 @@ type goRpc struct{}
// This ensures we use an adequate buffer during reading and writing.
// If not configured, we will internally initialize and use a buffer during reads and writes.
// This can be turned off via the RPCNoBuffer option on the Handle.
-// var handle codec.JsonHandle
-// handle.RPCNoBuffer = true // turns off attempt by rpc module to initialize a buffer
+//
+// var handle codec.JsonHandle
+// handle.RPCNoBuffer = true // turns off attempt by rpc module to initialize a buffer
//
// Example 1: one way of configuring buffering explicitly:
-// var handle codec.JsonHandle // codec handle
-// handle.ReaderBufferSize = 1024
-// handle.WriterBufferSize = 1024
-// var conn io.ReadWriteCloser // connection got from a socket
-// var serverCodec = GoRpc.ServerCodec(conn, handle)
-// var clientCodec = GoRpc.ClientCodec(conn, handle)
+//
+// var handle codec.JsonHandle // codec handle
+// handle.ReaderBufferSize = 1024
+// handle.WriterBufferSize = 1024
+// var conn io.ReadWriteCloser // connection got from a socket
+// var serverCodec = GoRpc.ServerCodec(conn, handle)
+// var clientCodec = GoRpc.ClientCodec(conn, handle)
//
// Example 2: you can also explicitly create a buffered connection yourself,
// and not worry about configuring the buffer sizes in the Handle.
-// var handle codec.Handle // codec handle
-// var conn io.ReadWriteCloser // connection got from a socket
-// var bufconn = struct { // bufconn here is a buffered io.ReadWriteCloser
-// io.Closer
-// *bufio.Reader
-// *bufio.Writer
-// }{conn, bufio.NewReader(conn), bufio.NewWriter(conn)}
-// var serverCodec = GoRpc.ServerCodec(bufconn, handle)
-// var clientCodec = GoRpc.ClientCodec(bufconn, handle)
//
+// var handle codec.Handle // codec handle
+// var conn io.ReadWriteCloser // connection got from a socket
+// var bufconn = struct { // bufconn here is a buffered io.ReadWriteCloser
+// io.Closer
+// *bufio.Reader
+// *bufio.Writer
+// }{conn, bufio.NewReader(conn), bufio.NewWriter(conn)}
+// var serverCodec = GoRpc.ServerCodec(bufconn, handle)
+// var clientCodec = GoRpc.ClientCodec(bufconn, handle)
var GoRpc goRpc
func (x goRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec {