Try version 1.4.0 now:
I added support for sending text messages:
websocket.send(this.ws, "ping", {type = websocket.DATA_TYPE_TEXT})
And also for the connection, I added support for adding custom headers:
local params = {
headers = "Sec-WebSocket-Protocol: chat\r\n"
}
self.ws = websocket.connect(url, params, function(self, conn, data)
end)