stream: improve io sending