Documentation
¶
Index ¶
- Variables
- type Stream
- func (s *Stream) Close() error
- func (s *Stream) CloseSend() error
- func (s *Stream) Context() context.Context
- func (s *Stream) MsgRecv(msg srpc.Message) error
- func (s *Stream) MsgSend(msg srpc.Message) error
- func (s *Stream) Recv() (*rpcstream.RpcStreamPacket, error)
- func (s *Stream) RecvRaw() ([]byte, error)
- func (s *Stream) Send(pkt *rpcstream.RpcStreamPacket) error
- func (s *Stream) SendRaw(data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxMessageSize uint32 = 10 * 1024 * 1024 // 10MB
MaxMessageSize is the max message size in bytes.
Functions ¶
This section is empty.
Types ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream wraps an io.ReadWriteCloser to implement rpcstream.RpcStream. Uses LittleEndian uint32 length-prefix framing for messages.
func New ¶
func New(ctx context.Context, rwc io.ReadWriteCloser) *Stream
New creates a new framed Stream.
func (*Stream) CloseSend ¶
CloseSend signals to the remote that we will no longer send any messages.
func (*Stream) Recv ¶
func (s *Stream) Recv() (*rpcstream.RpcStreamPacket, error)
Recv receives an RpcStreamPacket.
Click to show internal directories.
Click to hide internal directories.