Skip to content

Instantly share code, notes, and snippets.

@terrajobst
Created July 9, 2018 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terrajobst/ee86ab15d1d7a1d5869d1c1f2443f3b3 to your computer and use it in GitHub Desktop.
Save terrajobst/ee86ab15d1d7a1d5869d1c1f2443f3b3 to your computer and use it in GitHub Desktop.
async Task ProcessLinesAsync(NetworkStream stream)
{
var buffer = new byte[1024];
await stream.ReadAsync(buffer, 0, buffer.Length);
// Process a single line from the buffer
ProcessLine(buffer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment