[pve-devel] preview of novnc integration ready
Alexandre DERUMIER
aderumier at odiso.com
Sun Jun 1 18:21:12 CEST 2014
>>Yes, that code shows that it should be just a few lines of code at the right place ;-)
Maybe this require a little more code, because we don't use anyevent::http:server,
so we need to add code to handle http requests like
Client request:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
Origin: http://example.com
Server response:
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=
Sec-WebSocket-Protocol: chat
another example here:
https://github.com/typester/anyevent-websocket-demo/blob/master/chat.pl
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre DERUMIER" <aderumier at odiso.com>
Cc: pve-devel at pve.proxmox.com, "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag>
Envoyé: Dimanche 1 Juin 2014 15:52:33
Objet: RE: [pve-devel] preview of novnc integration ready
> >>If you go that way, please use the HTTPServer class, so that we get a fully
> async implementation.
>
> maybe this could help:
>
> http://search.cpan.org/~vti/Protocol-WebSocket-0.17/
> https://github.com/vti/protocol-websocket/blob/master/examples/anyevent-
> http-server.pl
>
Yes, that code shows that it should be just a few lines of code at the right place ;-)
More information about the pve-devel
mailing list