aspnet/SignalR-Server — pull request #29 by davidfowl (2014-07-06 04:24:44+00:00)
Title: Use pool of buffers when writing outgoing responses

- Use IMemoryPool and MemoryPool impl from Kestrel to write outgoing
responses for all transports.
- Removed BinaryTextWriter.cs and BufferTextWriter.cs implementations
and replaced them with MemoryPoolTextWriter and BinaryMemoryPoolTextWriter
impl.
- Simplified IWebSocket and WebSocketTransport by only allowing
ArraySegment to be sent. Also Removed SendChunk and
Flush methods since we'll always send a single chunk.
- Use preallocated byte[] for keep alive sends and initialize sends for each
transport.
- Updated sample to allow switching transport in the query string. Ported
signalr.samples.js from the existing SignalR/SignalR repository.
- Verified on existing SignalR stack that this doesn't regress performance
with the existing pool sizes compared to the existing impl.

/cc @DamianEdwards @lodejard @halter73