I want to store my websocket connection in cookies. I use $.cookie('ws', ws)
; in firebug ws looks like:
WebSocket {binaryType: "blob", extensions: "", protocol: "", onclose: function, onerror: null…}
URL: "wss://localhost:5432/"
binaryType: "blob"
bufferedAmount: 0
extensions: ""
onclose: function (m) {
onerror: null
onmessage: function (m) {
onopen: function () {
protocol: ""
readyState: 0
url: "wss://localhost:5432/"
__proto__: WebSocket
}
Problem:
When I get my websocket connection from cookies it looks like: [object WebSocket]
and I can't pull anything from it.
Question: How can I convert [object WebSocket]
to normal websocket object?