Given that a TCP connection is technically, two way, why do we say Http long polling is unidirectional and web socket is bi-directional? Is it how the long polling standard was implemented and there is some nuanced thing there? To me even a http long polling seems bi-directional. I cannot find anything concrete that cites a proper technical difference. Just vague blogs citing, only client can initiate a request with server in long polling. That does not make much sense as it is vague. Once a client has the connection to server, both client and server can send data to each other even in long polling.
With long polling, the TCP/TLS connection is made, then the client sends a request to the server, and then the connection is left open and from then on information flows from the server to the client only. In long polling, the client can't send any additional information to the server after that initial request (at least not until after the server has sent back a reply; after that, the client can make another request)
With WebSocket OTOH, the communication is full-duplex, i.e. the client and the server are both free to send more data across the connection any time they want to.