Answer the question
In order to leave comments, you need to log in
How to use http2 to work with Bots Longpoll?
There was an idea to use not the standard https.request, but http2 to receive Bots Longpoll API VK events. Since the https connection is terminated immediately after receiving the event, it takes time to establish a new one. Http2 allows you to create a persistent connection and make multiple simultaneous requests/responses on the same connection.
Nodejs has support for Http2 , but I could not find a clear explanation of how to use it to work with the VK API.
Let's say a response has already been received with connection data
{ key: 'KEY',
server: 'https://lp.vk.com/SERVET',
ts: 1 }
Answer the question
In order to leave comments, you need to log in
Using http2 will not solve your problems.
There is more problem in the hands than in the choice of protocol
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question