Hello Vinayak,
Thank you for raising the question. To provide the full context, my answer is going to be a bit involved. But long story short, Web PubSub for Socket.IO fully supports upgrading from long-polling based mechanism to WebSocket-based.
Involved answer.
How Socket.IO the library works is that initially it connects with polling-based mechanism. When WebSocket is available, it then upgrades to WebSocket-based. Let's say somehow the WebSocket connection is disconnected. What the client library does is that it will try to reconnect. The reconnect will start a new connection. Because it's a new connection, it will try polling-based mechanism first and if then WebSocket is available. If WebSocket is not available, this new connection will stay polling-based.
This is the behavior when using Socket.IO library and it remains the same when you use Web PubSub for Socket.IO.
Let me know if it clarifies things for you.