Support long-polling keep alives on the JS client

#1781
Support long-polling keep alives on the .NET client

#1781