So I was using the web3 API from the NodeJS 'web3' module very happily and it works very well (it uses HTTP transport AFAIU). But now I want to receive events from the server (without polling), and for that it seems I need to use the subscription API.
However, the documentation I just linked states subscriptions require a full duplex connection. Geth offers such connections in the form of websockets (enable with --ws) and ipc (enabled by default). Fair enough.
But, for the life of me, I cannot find any sample out there of how to connect via IPC/WebSockets. If the documentation included a simple hello world sample of a subscription, it would be rad.