ServeSingleRequest reads and processes a single RPC request from the given codec. It will not close the codec unless a non-recoverable error has occurred. Note, this method will return after a single request has been processed!
(ctx context.Context, codec ServerCodec, options CodecOption)
| 223 | // close the codec unless a non-recoverable error has occurred. Note, this method will return after |
| 224 | // a single request has been processed! |
| 225 | func (s *Server) ServeSingleRequest(ctx context.Context, codec ServerCodec, options CodecOption) { |
| 226 | s.serveRequest(ctx, codec, true, options) |
| 227 | } |
| 228 | |
| 229 | // Stop will stop reading new requests, wait for stopPendingRequestTimeout to allow pending requests to finish, |
| 230 | // close all codecs which will cancel pending requests/subscriptions. |