rejectedsoftware/vibe.d — pull request #120 by kyubuns (2012-10-27 18:11:42+00:00)
Title: Added connection close method for WebSocket

I wish to call WebSocket.close().
I have written implement of close frame sender and receiver without body.
( http://tools.ietf.org/html/rfc6455#section-5.5.1 "The Close frame MAY contain a body")

I think this code has one problem.
When receive close frame by WebSocket.receive method, return value of the method is empty of ubyte[] type.
This is not intuitive movement.
What do you think?

---
ex.

string msg = cast(string)socket.receive(); //<- receive close frame!
assert(msg == "");