pub async fn accept_runner<S: AsyncRead + AsyncWrite + Unpin>(
stream: &mut S,
agent_version: &str,
) -> Result<RunnerMode, ChannelError>Expand description
Accepts a newly connected runner: reads its hello, refuses a version mismatch, and
welcomes it otherwise.
§Errors
Returns ChannelError::Refused after sending refused for a version mismatch,
ChannelError::Unexpected if the first message isn’t hello, or a channel error.