private static Task PerformKeepAlive(object state) { var transport = (ServerSentEventsTransport)state; transport.Context.Response.Write(new ArraySegment<byte>(_keepAlive)); return transport.Context.Response.Flush(); }