Stream abstracts the transport mechanics from the JSON RPC protocol. A Conn reads and writes messages using the stream it was provided on construction, and assumes that each call to Read or Write fully transfers a single message, or returns an error. A stream is not safe for concurrent use, it is ex
| 22 | // A stream is not safe for concurrent use, it is expected it will be used by |
| 23 | // a single Conn in a safe manner. |
| 24 | type Stream interface { |
| 25 | // Read gets the next message from the stream. |
| 26 | Read(context.Context) (Message, int64, error) |
| 27 | // Write sends a message to the stream. |
| 28 | Write(context.Context, Message) (int64, error) |
| 29 | // Close closes the connection. |
| 30 | // Any blocked Read or Write operations will be unblocked and return errors. |
| 31 | Close() error |
| 32 | } |
| 33 | |
| 34 | // Framer wraps a network connection up into a Stream. |
| 35 | // It is responsible for the framing and encoding of messages into wire form. |
no outgoing calls
no test coverage detected
searching dependent graphs…