rejectedsoftware/vibe.d — pull request #111 by eldar (2012-10-16 21:37:46+00:00)
Title: WebSocket.connected to call TcpConnection.connected

As discussed in the [forums](http://news.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/512/) ```WebSocket.connected ```method currently calls ```TcpConnection.empty``` method, which means that it will only return when there is new data coming and we cannot for example send data to the socket.

Changing it to call ```TcpConnection.connected()``` instead fixes the problem. However we have to downcast the ```Stream``` reference to ```TcpConnection``` to that - I am not sure if that's good but seems sensible to me - Websockets actually require not just a stream but a socket.